Set aria-selected property for chat colors
This commit is contained in:
parent
e9aa30f5bf
commit
a5c6db096b
1 changed files with 4 additions and 2 deletions
|
@ -179,6 +179,7 @@ export function ChatColorPicker({
|
|||
{ConversationColors.map((color, i) => (
|
||||
<div
|
||||
aria-label={color}
|
||||
aria-selected={color === selectedColor}
|
||||
className={classNames(
|
||||
`ChatColorPicker__bubble ChatColorPicker__bubble--${color}`,
|
||||
{
|
||||
|
@ -192,7 +193,7 @@ export function ChatColorPicker({
|
|||
onSelectColor(color);
|
||||
}
|
||||
}}
|
||||
role="button"
|
||||
role="option"
|
||||
tabIndex={0}
|
||||
ref={i === 0 ? focusRef : undefined}
|
||||
/>
|
||||
|
@ -311,6 +312,7 @@ function CustomColorBubble({
|
|||
const bubble = (
|
||||
<div
|
||||
aria-label={colorId}
|
||||
aria-selected={isSelected}
|
||||
className={classNames({
|
||||
ChatColorPicker__bubble: true,
|
||||
'ChatColorPicker__bubble--custom-selected': isSelected,
|
||||
|
@ -322,7 +324,7 @@ function CustomColorBubble({
|
|||
handleClick(ev);
|
||||
}
|
||||
}}
|
||||
role="button"
|
||||
role="option"
|
||||
tabIndex={0}
|
||||
style={{
|
||||
...getCustomColorStyle(color),
|
||||
|
|
Loading…
Reference in a new issue