Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixing a11y bug #508

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/images/editorOptions/highlight_tool_off.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/scripts/clipperUI/components/modeButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class ModeButtonClass extends ComponentBase<{}, PropsForModeButton> {
let idName: string = clipMode + "Button";

return (
<a className={className} role="option" aria-selected={this.props.selected}
<a className={className} role="button" aria-selected={this.props.selected}
id={idName} title={this.props.tooltipText ? this.props.tooltipText : ""}
aria-setsize={this.props["aria-setsize"]} aria-posinset={this.props["aria-posinset"]}
{...this.onElementFirstDraw(this.initiallySetFocus)}
Expand Down
2 changes: 1 addition & 1 deletion src/scripts/clipperUI/components/regionSelection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class RegionSelectionClass extends ComponentBase<{}, RegionSelectionProps> {
// No remove button is rendered if there's no callback specified
return (
this.props.onRemove
? <a className="region-selection-remove-button" role="button"
? <a className="region-selection-remove-button" role="button" style="z-index: 100;"
{...this.enableInvoke({callback: this.buttonHandler, tabIndex: 300, idOverride: Log.Click.Label.regionSelectionRemoveButton})}>
<img src={ExtensionUtils.getImageResourceUrl("editorOptions/delete_button.svg")} alt={Localization.getLocalizedString("WebClipper.Preview.RemoveSelectedRegion")} /></a>
: undefined
Expand Down
5 changes: 3 additions & 2 deletions src/scripts/clipperUI/components/spriteAnimation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export interface SpriteAnimationProps {
totalFrameCount: number;
loop?: boolean;
ariaLabel?: string;
tabIndex?: number;
}

export interface SpriteAnimationState {
Expand Down Expand Up @@ -114,7 +115,7 @@ class SpriteAnimationClass extends ComponentBase<SpriteAnimationState, SpriteAni
let imageWidth = this.props.imageWidth ? this.props.imageWidth : 32;

let ariaLabel = this.props.ariaLabel ? this.props.ariaLabel : Localization.getLocalizedString("WebClipper.Accessibility.ScreenReader.Loading");

let tabIndex = this.props.tabIndex ? this.props.tabIndex : 290;
let style = {
backgroundImage: "url(" + this.props.spriteUrl + ")",
backgroundRepeat: "no-repeat",
Expand All @@ -127,7 +128,7 @@ class SpriteAnimationClass extends ComponentBase<SpriteAnimationState, SpriteAni
className={Constants.Classes.spinner}
config={this.configForSpinner.bind(this)}
style={style}
tabIndex="290"
tabIndex={tabIndex}
aria-label={ariaLabel}
role="progressbar"
aria-valuemin="0"
Expand Down
2 changes: 1 addition & 1 deletion src/scripts/clipperUI/panels/successPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class SuccessPanelClass extends ComponentBase<{ }, ClipperStateProp> {
return (
<div id={Constants.Ids.clipperSuccessContainer}>
<div className="messageLabelContainer successPagePadding">
<SpriteAnimation spriteUrl={ExtensionUtils.getImageResourceUrl("checkmark.png")} imageHeight={28} totalFrameCount={30} loop={false}/>
<SpriteAnimation spriteUrl={ExtensionUtils.getImageResourceUrl("checkmark.png")} imageHeight={28} totalFrameCount={30} loop={false} tabIndex={-1} />
<span className="actionLabelFont messageLabel" role="alert"
style={Localization.getFontFamilyAsStyle(Localization.FontFamily.Light)}>
{Localization.getLocalizedString("WebClipper.Label.ClipSuccessful")}
Expand Down
12 changes: 12 additions & 0 deletions src/styles/clipper.less
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,18 @@
padding-left: 5px;
}

.Notebook:focus {
border: 1px solid black !important;
}

.Section:focus {
border: 1px solid black !important;
}

.region-selection-remove-button:focus {
border: 1px solid black !important;
}

@media (forced-colors: active) {
.buttonTextInHighContrast{
forced-color-adjust: none;
Expand Down