Message.tsx: Use role=row for container, not role=button
This commit is contained in:
parent
78ad890a20
commit
67ddec65d9
3 changed files with 6 additions and 5 deletions
|
@ -356,7 +356,7 @@ $message-padding-horizontal: 12px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.module-message:focus {
|
.module-message:focus-within {
|
||||||
@include keyboard-mode {
|
@include keyboard-mode {
|
||||||
background: $color-selected-message-background-light;
|
background: $color-selected-message-background-light;
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,7 +13,8 @@
|
||||||
|
|
||||||
&:focus {
|
&:focus {
|
||||||
@include keyboard-mode {
|
@include keyboard-mode {
|
||||||
color: $color-ultramarine;
|
border: 1px solid $color-black;
|
||||||
|
outline: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2999,9 +2999,9 @@ export class Message extends React.PureComponent<Props, State> {
|
||||||
expiring ? 'module-message--expired' : null
|
expiring ? 'module-message--expired' : null
|
||||||
)}
|
)}
|
||||||
tabIndex={0}
|
tabIndex={0}
|
||||||
// We pretend to be a button because we sometimes contain buttons and a button
|
// We need to have a role because screenreaders need to be able to focus here to
|
||||||
// cannot be within another button
|
// read the message, but we can't be a button; that would break inner buttons.
|
||||||
role="button"
|
role="row"
|
||||||
onKeyDown={this.handleKeyDown}
|
onKeyDown={this.handleKeyDown}
|
||||||
onFocus={this.handleFocus}
|
onFocus={this.handleFocus}
|
||||||
ref={this.focusRef}
|
ref={this.focusRef}
|
||||||
|
|
Loading…
Reference in a new issue