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

[MA-30]: MM-61604: Provide proper name, role, and state information to skin tone accordion #26

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ export class EmojiPickerSkin extends React.PureComponent<Props, State> {
onClick={() => this.hideSkinTonePicker(skin)}
>
<img
alt={skinTone.label.defaultMessage}
src={imgTrans}
className={spriteClassName}
/>
Expand All @@ -144,6 +145,9 @@ export class EmojiPickerSkin extends React.PureComponent<Props, State> {
className='skin-tones__close-icon style--none'
onClick={() => this.hideSkinTonePicker(this.props.userSkinTone)}
aria-label={closeButtonLabel}
aria-expanded={this.state.pickerExtended}
tabIndex={0}
ayush-chauhan233 marked this conversation as resolved.
Show resolved Hide resolved
aria-controls='skin-tones-icons'
>
<CloseIcon
size={16}
Expand All @@ -156,7 +160,12 @@ export class EmojiPickerSkin extends React.PureComponent<Props, State> {
/>
</div>
</div>
<div className='skin-tones__icons'>
<div
className='skin-tones__icons'
id='skin-tones-icons'
aria-label='Skin tone icons'
role='region'
>
{choices}
</div>
</>
Expand All @@ -182,6 +191,8 @@ export class EmojiPickerSkin extends React.PureComponent<Props, State> {
className='style--none skin-tones__icon skin-tones__expand-icon'
onClick={this.showSkinTonePicker}
aria-label={expandButtonLabel}
aria-controls='skin-tones-icons'
aria-expanded={this.state.pickerExtended}
>
<img
alt={'emoji skin tone picker'}
Expand All @@ -201,8 +212,11 @@ export class EmojiPickerSkin extends React.PureComponent<Props, State> {
timeout={200}
>
<div className={classNames('skin-tones', {'skin-tones--active': this.state.pickerExtended})}>
<div className={classNames('skin-tones__content', {'skin-tones__content__single': !this.state.pickerExtended})}>
{this.state.pickerExtended ? this.extended() : this.collapsed()}
<div
className={classNames('skin-tones__content', {'skin-tones__content__single': !this.state.pickerExtended})}
aria-orientation='horizontal'
>
{this.state.pickerExtended ? this.extended() : this.collapsed() }
</div>
</div>
</CSSTransition>
Expand Down
Loading