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

fix: tab controls not labeled properly #916

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
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
5 changes: 3 additions & 2 deletions packages/emoji-mart/src/components/Navigation/Navigation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export default class Navigation extends PureComponent {
data-position={this.props.position}
dir={this.props.dir}
>
<div class="flex relative">
<div class="flex relative" role="tablist">
{this.categories.map((category, i) => {
const title = category.name || I18n.categories[category.id]
const selected =
Expand All @@ -73,10 +73,11 @@ export default class Navigation extends PureComponent {
return (
<button
aria-label={title}
aria-selected={selected || undefined}
aria-selected={selected ? 'true' : 'false'}
title={title}
type="button"
class="flex flex-grow flex-center"
role="tab"
onMouseDown={(e) => e.preventDefault()}
onClick={() => {
this.props.onClick({ category, i })
Expand Down
2 changes: 2 additions & 0 deletions packages/emoji-mart/src/components/Picker/Picker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -656,6 +656,8 @@ export default class Picker extends Component {
if (!this.state.showSkins) return
this.setState({ showSkins: null, tempSkin: null })

this.refs.skinToneButton.current.focus()

this.base.removeEventListener('click', this.handleBaseClick)
this.base.removeEventListener('keydown', this.handleBaseKeydown)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ button {
transition: transform var(--duration) var(--easing);
}

button[aria-selected] {
button[aria-selected="true"] {
color: rgb(var(--em-rgb-accent));
}
}
Expand Down
Loading