Skip to content

ColorArea: remove aria-roledescription on iOS/Android #2547

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

Merged

Conversation

majornista
Copy link
Collaborator

@majornista majornista commented Nov 11, 2021

To better reflect behavior of slider inputs with mobile screen readers on iOS and Android, each input should be labeled by its individual channel name and we should remove aria-roledescription so the input is identified simply as a slider control.

Relates to: #2483, #1732 and #1118 in particular: #2483 (comment)

✅ Pull Request Checklist:

  • Included link to corresponding React Spectrum GitHub Issue.
  • Added/updated unit tests and storybook for this change (for new code or code which already has tests).
  • Filled out test instructions.
  • Updated documentation (if it already exists for this component).
  • Looked at the Accessibility Practices for this feature - Aria Practices

📝 Test Instructions:

  1. Open a ColorArea story in Safari on an iOS device.
  2. Turn on VoiceOver for iOS.
  3. Use right swipe VoiceOver gesture to navigate to the first of the input[type=range] elements within the ColorArea component.
  4. It should announce simply as a slider, labelled by the color channel name for the horizontal channel and with the value text for just that channel.
  5. Swipe down/up to decrease/increase the value of the horizontal channel.
  6. Use right swipe VoiceOver gesture to navigate to the second of the input[type=range] elements within the ColorArea component.
  7. It should announce simply as a slider, labelled by the color channel name for the vertical channel and with the value text for just that channel.
  8. Swipe down/up to decrease/increase the value of the vertical channel.

Since each slider within the ColorArea control adjusts independently on mobile, it doesn't make sense to describe them as a "2D slider".

🧢 Your Project:

Adobe/Accessibility

To better reflect behavior of slider inputs with mobile screen readers on iOS and Android, each input should be labeled by its individual channel name and we should remove aria-roledescription so the input is identified simply as a slider control.
On iOS/Android, the aria-valuetext for each slider within the ColorArea control should just be the value for that channel, and need not include the value for the second channel. The value for all three channels is included as the title attribute.
@snowystinger snowystinger merged commit 1e58328 into adobe:color-area Nov 11, 2021
majornista added a commit to majornista/react-spectrum-v3 that referenced this pull request Nov 11, 2021
* ColorArea: remove aria-roledescription on iOS/Android

To better reflect behavior of slider inputs with mobile screen readers on iOS and Android, each input should be labeled by its individual channel name and we should remove aria-roledescription so the input is identified simply as a slider control.

* ColorArea: change aria-valuetext for iOS/Android

On iOS/Android, the aria-valuetext for each slider within the ColorArea control should just be the value for that channel, and need not include the value for the second channel. The value for all three channels is included as the title attribute.

* ColorArea: include channel name in aria-valuetext for iOS/Android
snowystinger added a commit that referenced this pull request Feb 25, 2022
* Initial ColorArea implementation

* refactor aria back to stately

* more refactoring

* refactor step logic and defaults

* tests and subsequent fixes from tests

* Add uncontrolled to tests

* Add size story

* use snaptovalue and add page steps

* remove dead code

* rename variable to make more sense, fix description

* Add isDisabled based on Spectrum designs

* add min size

* add prop description

* Get back to no useMove changes

* Combine the useMove frequently appears with useKeyboard  (#2508)

* Combine the useMove frequently appears with useKeyboard

* fix merge mistake

* Remove isPage from useMove, add modifier keys

* continue propagation for keys we don't handle

* have aria pass through the step size

Co-authored-by: Rob Snow <[email protected]>

* ColorArea: remove aria-roledescription on iOS/Android (#2547)

* ColorArea: remove aria-roledescription on iOS/Android

To better reflect behavior of slider inputs with mobile screen readers on iOS and Android, each input should be labeled by its individual channel name and we should remove aria-roledescription so the input is identified simply as a slider control.

* ColorArea: change aria-valuetext for iOS/Android

On iOS/Android, the aria-valuetext for each slider within the ColorArea control should just be the value for that channel, and need not include the value for the second channel. The value for all three channels is included as the title attribute.

* ColorArea: include channel name in aria-valuetext for iOS/Android

* Add formatting for color name and value based on locale

* allow for differences in formatting strings

* fix lint

* @trivial remove extra whitespace/redundant afterEach

* fix: tests

* fix remaining issues before merges on main make it in

* incorporate michaels a11y and locale fixes

Co-authored-by: Michael Jordan <[email protected]>
Co-authored-by: Daniel Lu <[email protected]>
Co-authored-by: GitHub <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants