Navigation Menu

Skip to content

Commit

Permalink
fix(docs): fixed some a11y issues in documentation site
Browse files Browse the repository at this point in the history
  • Loading branch information
mlaursen committed Dec 31, 2020
1 parent 9807b19 commit 6fee23c
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 7 deletions.
Expand Up @@ -43,6 +43,7 @@ export function CodePreferenceToggle({
toggle();
}}
id={`${PREFIX}${id}`}
aria-label="Preferred Coding Language"
aria-pressed={isJs}
buttonType="icon"
tooltip={tooltip}
Expand All @@ -65,7 +66,7 @@ export function CodePreferenceToggle({

toggle();
}}
primaryText="Preferred Codinging Language"
primaryText="Preferred Coding Language"
secondaryText={`Current language: ${name}`}
/>
);
Expand Down
Expand Up @@ -33,8 +33,7 @@ const HeadingLink: FC<HeadingLinkProps> = ({ idRef }) => {
href={`${prefix}#${idRef}`}
className="heading__link"
onClick={handleClick}
aria-label="Quick Link"
aria-describedby={idRef}
aria-hidden
>
#
</LinkUnstyled>
Expand Down
6 changes: 5 additions & 1 deletion packages/documentation/src/components/Markdown/utils.ts
Expand Up @@ -96,7 +96,11 @@ renderer.heading = (text, level, _raw, slugger) => {
});

return `<h${level} id="${id}" class="${className}">
${isValidHeading ? `<a href="#${id}" class="heading__link">#</a>` : ""}
${
isValidHeading
? `<a href="#${id}" class="heading__link" aria-hidden="true">#</a>`
: ""
}
${text}
</h${level}>`;
};
Expand Down
2 changes: 1 addition & 1 deletion packages/documentation/src/icons/GithubSVGIcon.tsx
Expand Up @@ -8,7 +8,7 @@ const GithubSVGIcon: FC<SVGIconProps> = ({ className, ...props }) => (
);

GithubSVGIcon.defaultProps = {
role: "img",
role: "presentation",
focusable: "false",
};

Expand Down
2 changes: 1 addition & 1 deletion packages/documentation/src/icons/MaterialDesignSVGIcon.tsx
Expand Up @@ -11,7 +11,7 @@ const MaterialDesignSVGIcon: FC<SVGIconProps> = ({ className, ...props }) => (
);

MaterialDesignSVGIcon.defaultProps = {
role: "img",
role: "presentation",
focusable: "false",
};

Expand Down
2 changes: 1 addition & 1 deletion packages/documentation/src/icons/ReactSVGIcon.tsx
Expand Up @@ -13,7 +13,7 @@ const ReactSVGIcon: FC<SVGIconProps> = ({ className, ...props }) => (
);

ReactSVGIcon.defaultProps = {
role: "img",
role: "presentation",
focusable: "false",
};

Expand Down

0 comments on commit 6fee23c

Please sign in to comment.