commit
3b4d5ee25a
|
@ -202,13 +202,12 @@ export default class Category extends React.Component {
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<ul className="emoji-mart-category-list">
|
<ul className="emoji-mart-category-list">
|
||||||
{emojis &&
|
{emojis &&
|
||||||
emojis.map((emoji) => (
|
emojis.map((emoji) => (
|
||||||
<li key={emoji.id || emoji}>
|
<li key={emoji.id || emoji}>
|
||||||
{NimbleEmoji({ emoji: emoji, data: this.data, ...emojiProps })}
|
{NimbleEmoji({ emoji: emoji, data: this.data, ...emojiProps })}
|
||||||
</li>
|
</li>
|
||||||
)
|
))}
|
||||||
)}
|
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
{emojis &&
|
{emojis &&
|
||||||
|
|
|
@ -32,17 +32,19 @@ export default class SkinsDot extends Skins {
|
||||||
className={`emoji-mart-skin-swatch${selected ? ' selected' : ''}`}
|
className={`emoji-mart-skin-swatch${selected ? ' selected' : ''}`}
|
||||||
aria-label={i18n.skintones[skinTone]}
|
aria-label={i18n.skintones[skinTone]}
|
||||||
aria-hidden={!visible}
|
aria-hidden={!visible}
|
||||||
{...opened ? { role: 'menuitem' } : {}}
|
{...(opened ? { role: 'menuitem' } : {})}
|
||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
onClick={this.handleClick}
|
onClick={this.handleClick}
|
||||||
onKeyDown={this.handleKeyDown}
|
onKeyDown={this.handleKeyDown}
|
||||||
role="button"
|
role="button"
|
||||||
{...selected ? {
|
{...(selected
|
||||||
'aria-haspopup': true,
|
? {
|
||||||
'aria-expanded': !!opened,
|
'aria-haspopup': true,
|
||||||
} : {}}
|
'aria-expanded': !!opened,
|
||||||
{...opened ? { 'aria-pressed': !!selected } : {}}
|
}
|
||||||
|
: {})}
|
||||||
|
{...(opened ? { 'aria-pressed': !!selected } : {})}
|
||||||
tabIndex={visible ? '0' : ''}
|
tabIndex={visible ? '0' : ''}
|
||||||
aria-label={i18n.skintones[skinTone]}
|
aria-label={i18n.skintones[skinTone]}
|
||||||
title={i18n.skintones[skinTone]}
|
title={i18n.skintones[skinTone]}
|
||||||
|
@ -58,7 +60,7 @@ export default class SkinsDot extends Skins {
|
||||||
className={`emoji-mart-skin-swatches${opened ? ' opened' : ''}`}
|
className={`emoji-mart-skin-swatches${opened ? ' opened' : ''}`}
|
||||||
aria-label={i18n.skintext}
|
aria-label={i18n.skintext}
|
||||||
>
|
>
|
||||||
<div {...opened ? { role: 'menubar' } : {}}>{skinToneNodes}</div>
|
<div {...(opened ? { role: 'menubar' } : {})}>{skinToneNodes}</div>
|
||||||
</section>
|
</section>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue