parent
8c80e7d4e5
commit
e77c63bc9a
|
@ -60,6 +60,7 @@ import { Picker } from 'emoji-mart'
|
||||||
search: 'Search',
|
search: 'Search',
|
||||||
notfound: 'No Emoji Found',
|
notfound: 'No Emoji Found',
|
||||||
skintext: 'Choose your default skin tone',
|
skintext: 'Choose your default skin tone',
|
||||||
|
categorieslabel: 'Emoji categories', // Accessible title for the list of categories
|
||||||
categories: {
|
categories: {
|
||||||
search: 'Search Results',
|
search: 'Search Results',
|
||||||
recent: 'Frequently Used',
|
recent: 'Frequently Used',
|
||||||
|
|
|
@ -49,6 +49,10 @@
|
||||||
padding: 12px 4px;
|
padding: 12px 4px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
transition: color .1s ease-out;
|
transition: color .1s ease-out;
|
||||||
|
margin: 0;
|
||||||
|
box-shadow: none;
|
||||||
|
background: none;
|
||||||
|
border: none;
|
||||||
}
|
}
|
||||||
.emoji-mart-anchor:hover,
|
.emoji-mart-anchor:hover,
|
||||||
.emoji-mart-anchor-selected {
|
.emoji-mart-anchor-selected {
|
||||||
|
|
|
@ -28,7 +28,7 @@ export default class Anchors extends React.PureComponent {
|
||||||
{ selected } = this.state
|
{ selected } = this.state
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="emoji-mart-anchors">
|
<nav className="emoji-mart-anchors" aria-label={i18n.categorieslabel}>
|
||||||
{categories.map((category, i) => {
|
{categories.map((category, i) => {
|
||||||
var { id, name, anchor } = category,
|
var { id, name, anchor } = category,
|
||||||
isSelected = name == selected
|
isSelected = name == selected
|
||||||
|
@ -38,8 +38,9 @@ export default class Anchors extends React.PureComponent {
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<span
|
<button
|
||||||
key={id}
|
key={id}
|
||||||
|
aria-label={i18n.categories[id]}
|
||||||
title={i18n.categories[id]}
|
title={i18n.categories[id]}
|
||||||
data-index={i}
|
data-index={i}
|
||||||
onClick={this.handleClick}
|
onClick={this.handleClick}
|
||||||
|
@ -55,10 +56,10 @@ export default class Anchors extends React.PureComponent {
|
||||||
className="emoji-mart-anchor-bar"
|
className="emoji-mart-anchor-bar"
|
||||||
style={{ backgroundColor: color }}
|
style={{ backgroundColor: color }}
|
||||||
/>
|
/>
|
||||||
</span>
|
</button>
|
||||||
)
|
)
|
||||||
})}
|
})}
|
||||||
</div>
|
</nav>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,6 +20,7 @@ const I18N = {
|
||||||
search: 'Search',
|
search: 'Search',
|
||||||
notfound: 'No Emoji Found',
|
notfound: 'No Emoji Found',
|
||||||
skintext: 'Choose your default skin tone',
|
skintext: 'Choose your default skin tone',
|
||||||
|
categorieslabel: 'Emoji categories',
|
||||||
categories: {
|
categories: {
|
||||||
search: 'Search Results',
|
search: 'Search Results',
|
||||||
recent: 'Frequently Used',
|
recent: 'Frequently Used',
|
||||||
|
|
Loading…
Reference in New Issue