Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Desktop: Accessibility: Add error indication on Note properties #11784

Open
wants to merge 9 commits into
base: dev
Choose a base branch
from

Conversation

pedr
Copy link
Collaborator

@pedr pedr commented Feb 5, 2025

Related to #10795

Summary

Add visual and error information when a invalid input is set to location input on Note Properties

Images

2025-02-05_17-36
2025-02-05_17-36_1
2025-02-05_17-37
2025-02-05_17-37_1

WCAG

3.3.1 Error Identification
3.3.3 Error Suggestion

G83: Providing text descriptions to identify required fields that were not completed
ARIA21: Using Aria-Invalid to Indicate An Error Field
G85: Providing a text description when user input falls outside the required format or values

Tests

I made manual tests

Test 1 - Invalid input

  1. Open Note Properties
  2. Input an invalid string on location input
  3. Expected to see the input field changing color and the error message bellow

Test 2 - Empty input

  1. Open Note Properties
  2. Cleaned the location input
  3. No error message should be shown

Test 3 - Error message is not permanent

  1. Open Note Properties
  2. Input an invalid string on location input
  3. Expected to see the input field changing color and the error message below
  4. Input a valid location (e.g.: 48.8581372, 2.2926735)
  5. Error message should go away

Test 4 - Storing value

  1. Open Note Properties
  2. Input a valid location (e.g.: 48.8581372, 2.2926735)
  3. Click OK button
  4. Reopen Note Properties
  5. New value for location should be there

@pedr pedr added desktop All desktop platforms accessibility Related to accessibility labels Feb 5, 2025
@@ -37,6 +37,7 @@ interface State {
formNote: FormNote;
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- Old code before rule was applied
editedValue: any;
isValid: Record<string, boolean>;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could this be typed more precisely? At the moment it looks like only the location property is supported?

In which case:

isValid: {
location: boolean;
}

@@ -191,6 +196,17 @@ class NotePropertiesDialog extends React.Component<Props, State> {
borderColor: theme.dividerColor,
};

this.styles_.invalidInput = {
border: '1px solid',
borderColor: 'red',
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That should come from the theme

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accessibility Related to accessibility desktop All desktop platforms
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants