Skip to content

Commit

Permalink
fix: read selected skin tone
Browse files Browse the repository at this point in the history
Choose default skin tone button was announced without the selected option, which is not a11y friendly. According [rules](https://www.w3.org/WAI/ARIA/apg/patterns/combobox/examples/combobox-select-only/) the already selected option should be read as well even before doing the action click.

Related to - PS-20646, PS-20687
  • Loading branch information
andrejkaPry committed Jun 18, 2024
1 parent efaeb84 commit 3f641ed
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion dist/browser.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/browser.js.map

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions dist/main.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/main.js.map

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions dist/module.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/module.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions packages/emoji-mart/src/components/Picker/Picker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -988,8 +988,8 @@ export default class Picker extends Component {
type="button"
ref={this.refs.skinToneButton}
class="skin-tone-button flex flex-auto flex-center flex-middle"
aria-selected={this.state.showSkins ? '' : undefined}
aria-label={I18n.skins.choose}
aria-selected={this.state.showSkins ? 'true' : 'false'}
aria-label={`${I18n.skins.choose}, ${I18n.skins[this.state.skin]}`}
title={I18n.skins.choose}
onClick={this.openSkins}
style={{
Expand Down

0 comments on commit 3f641ed

Please sign in to comment.