Merge pull request #3555 from matrix-org/t3chguy/a11y3
Accessibility fixes to autocomplete and tabpanels
This commit is contained in:
commit
4494e3b61b
6 changed files with 38 additions and 28 deletions
|
@ -78,8 +78,10 @@ export default class CommandProvider extends AutocompleteProvider {
|
||||||
}
|
}
|
||||||
|
|
||||||
renderCompletions(completions: [React.Component]): ?React.Component {
|
renderCompletions(completions: [React.Component]): ?React.Component {
|
||||||
return <div className="mx_Autocomplete_Completion_container_block">
|
return (
|
||||||
{ completions }
|
<div className="mx_Autocomplete_Completion_container_block" role="listbox" aria-label={_t("Command Autocomplete")}>
|
||||||
</div>;
|
{ completions }
|
||||||
|
</div>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,7 +34,7 @@ export class TextualCompletion extends React.Component {
|
||||||
...restProps
|
...restProps
|
||||||
} = this.props;
|
} = this.props;
|
||||||
return (
|
return (
|
||||||
<div className={classNames('mx_Autocomplete_Completion_block', className)} {...restProps}>
|
<div className={classNames('mx_Autocomplete_Completion_block', className)} role="option" {...restProps}>
|
||||||
<span className="mx_Autocomplete_Completion_title">{ title }</span>
|
<span className="mx_Autocomplete_Completion_title">{ title }</span>
|
||||||
<span className="mx_Autocomplete_Completion_subtitle">{ subtitle }</span>
|
<span className="mx_Autocomplete_Completion_subtitle">{ subtitle }</span>
|
||||||
<span className="mx_Autocomplete_Completion_description">{ description }</span>
|
<span className="mx_Autocomplete_Completion_description">{ description }</span>
|
||||||
|
|
|
@ -97,8 +97,14 @@ export default class DuckDuckGoProvider extends AutocompleteProvider {
|
||||||
}
|
}
|
||||||
|
|
||||||
renderCompletions(completions: [React.Component]): ?React.Component {
|
renderCompletions(completions: [React.Component]): ?React.Component {
|
||||||
return <div className="mx_Autocomplete_Completion_container_block">
|
return (
|
||||||
{ completions }
|
<div
|
||||||
</div>;
|
className="mx_Autocomplete_Completion_container_block"
|
||||||
|
role="listbox"
|
||||||
|
aria-label={_t("DuckDuckGo Results")}
|
||||||
|
>
|
||||||
|
{ completions }
|
||||||
|
</div>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -117,17 +117,17 @@ const FilePanel = createReactClass({
|
||||||
// console.log("rendering TimelinePanel for timelineSet " + this.state.timelineSet.room.roomId + " " +
|
// console.log("rendering TimelinePanel for timelineSet " + this.state.timelineSet.room.roomId + " " +
|
||||||
// "(" + this.state.timelineSet._timelines.join(", ") + ")" + " with key " + this.props.roomId);
|
// "(" + this.state.timelineSet._timelines.join(", ") + ")" + " with key " + this.props.roomId);
|
||||||
return (
|
return (
|
||||||
<TimelinePanel key={"filepanel_" + this.props.roomId}
|
<div className="mx_FilePanel" role="tabpanel">
|
||||||
className="mx_FilePanel"
|
<TimelinePanel key={"filepanel_" + this.props.roomId}
|
||||||
manageReadReceipts={false}
|
manageReadReceipts={false}
|
||||||
manageReadMarkers={false}
|
manageReadMarkers={false}
|
||||||
timelineSet={this.state.timelineSet}
|
timelineSet={this.state.timelineSet}
|
||||||
showUrlPreview = {false}
|
showUrlPreview = {false}
|
||||||
tileShape="file_grid"
|
tileShape="file_grid"
|
||||||
resizeNotifier={this.props.resizeNotifier}
|
resizeNotifier={this.props.resizeNotifier}
|
||||||
empty={_t('There are no visible files in this room')}
|
empty={_t('There are no visible files in this room')}
|
||||||
role="tabpanel"
|
/>
|
||||||
/>
|
</div>
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
return (
|
return (
|
||||||
|
|
|
@ -38,16 +38,16 @@ const NotificationPanel = createReactClass({
|
||||||
const timelineSet = MatrixClientPeg.get().getNotifTimelineSet();
|
const timelineSet = MatrixClientPeg.get().getNotifTimelineSet();
|
||||||
if (timelineSet) {
|
if (timelineSet) {
|
||||||
return (
|
return (
|
||||||
<TimelinePanel key={"NotificationPanel_" + this.props.roomId}
|
<div className="mx_NotificationPanel" role="tabpanel">
|
||||||
className="mx_NotificationPanel"
|
<TimelinePanel key={"NotificationPanel_" + this.props.roomId}
|
||||||
manageReadReceipts={false}
|
manageReadReceipts={false}
|
||||||
manageReadMarkers={false}
|
manageReadMarkers={false}
|
||||||
timelineSet={timelineSet}
|
timelineSet={timelineSet}
|
||||||
showUrlPreview={false}
|
showUrlPreview={false}
|
||||||
tileShape="notif"
|
tileShape="notif"
|
||||||
empty={_t('You have no visible notifications')}
|
empty={_t('You have no visible notifications')}
|
||||||
role="tabpanel"
|
/>
|
||||||
/>
|
</div>
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
console.error("No notifTimelineSet available!");
|
console.error("No notifTimelineSet available!");
|
||||||
|
|
|
@ -1745,8 +1745,10 @@
|
||||||
"Clear personal data": "Clear personal data",
|
"Clear personal data": "Clear personal data",
|
||||||
"Warning: Your personal data (including encryption keys) is still stored on this device. Clear it if you're finished using this device, or want to sign in to another account.": "Warning: Your personal data (including encryption keys) is still stored on this device. Clear it if you're finished using this device, or want to sign in to another account.",
|
"Warning: Your personal data (including encryption keys) is still stored on this device. Clear it if you're finished using this device, or want to sign in to another account.": "Warning: Your personal data (including encryption keys) is still stored on this device. Clear it if you're finished using this device, or want to sign in to another account.",
|
||||||
"Commands": "Commands",
|
"Commands": "Commands",
|
||||||
|
"Command Autocomplete": "Command Autocomplete",
|
||||||
"Community Autocomplete": "Community Autocomplete",
|
"Community Autocomplete": "Community Autocomplete",
|
||||||
"Results from DuckDuckGo": "Results from DuckDuckGo",
|
"Results from DuckDuckGo": "Results from DuckDuckGo",
|
||||||
|
"DuckDuckGo Results": "DuckDuckGo Results",
|
||||||
"Emoji": "Emoji",
|
"Emoji": "Emoji",
|
||||||
"Emoji Autocomplete": "Emoji Autocomplete",
|
"Emoji Autocomplete": "Emoji Autocomplete",
|
||||||
"Notify the whole room": "Notify the whole room",
|
"Notify the whole room": "Notify the whole room",
|
||||||
|
|
Loading…
Reference in a new issue