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

simplify ColorPalette for a11y #1618

Merged
merged 7 commits into from
Oct 11, 2023
Merged

simplify ColorPalette for a11y #1618

merged 7 commits into from
Oct 11, 2023

Conversation

mayank99
Copy link
Contributor

@mayank99 mayank99 commented Oct 5, 2023

Changes

accessibility improvements to ColorPalette and ColorSwatch:

  • removed all arrow key handling from palette:
    • it does not make sense on generic items, and i could not find an established pattern in my research.
    • default Tab navigation is more intuitive. the end user might find it confusing if Tab doesn't work.
  • changed role of swatch to button only when onClick is passed.
  • changed aria-selected (invalid on button) to aria-pressed

previous discussions:

Testing

tested by inspecting final markup and running through screenreaders.

VoiceOver+Safari NVDA+Firefox

removed unit tests for deleted code, added unit tests for new code.

Docs

updated basic colorpicker example in docs.

added changeset.

@mayank99 mayank99 self-assigned this Oct 5, 2023
@mayank99 mayank99 marked this pull request as ready for review October 10, 2023 17:21
@mayank99 mayank99 requested review from a team as code owners October 10, 2023 17:21
@mayank99 mayank99 requested review from gretanausedaite and siddhantrawal and removed request for a team October 10, 2023 17:21
Copy link
Contributor

@gretanausedaite gretanausedaite left a comment

Choose a reason for hiding this comment

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

LGTM 🌵

@mayank99 mayank99 merged commit 923329a into dev Oct 11, 2023
13 of 14 checks passed
@mayank99 mayank99 deleted the mayank/color-palette-a11y branch October 11, 2023 13:50
@imodeljs-admin imodeljs-admin mentioned this pull request Oct 23, 2023
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.

None yet

3 participants