mirror of
https://github.com/facebook/docusaurus.git
synced 2025-12-26 01:33:02 +00:00
refactor(v2): hide decorative SVGs from screen readers (#4926)
This commit is contained in:
parent
ce0764033c
commit
2303d6557b
|
|
@ -10,7 +10,7 @@ import type {Props} from '@theme/IconArrow';
|
|||
|
||||
const IconArrow = (props: Props): JSX.Element => {
|
||||
return (
|
||||
<svg width="20" height="20" role="img" {...props}>
|
||||
<svg width="20" height="20" aria-hidden="true" {...props}>
|
||||
<g fill="#7a7a7a">
|
||||
<path d="M9.992 10.023c0 .2-.062.399-.172.547l-4.996 7.492a.982.982 0 01-.828.454H1c-.55 0-1-.453-1-1 0-.2.059-.403.168-.551l4.629-6.942L.168 3.078A.939.939 0 010 2.528c0-.548.45-.997 1-.997h2.996c.352 0 .649.18.828.45L9.82 9.472c.11.148.172.347.172.55zm0 0" />
|
||||
<path d="M19.98 10.023c0 .2-.058.399-.168.547l-4.996 7.492a.987.987 0 01-.828.454h-3c-.547 0-.996-.453-.996-1 0-.2.059-.403.168-.551l4.625-6.942-4.625-6.945a.939.939 0 01-.168-.55 1 1 0 01.996-.997h3c.348 0 .649.18.828.45l4.996 7.492c.11.148.168.347.168.55zm0 0" />
|
||||
|
|
|
|||
|
|
@ -18,11 +18,9 @@ const IconEdit = ({className, ...restProps}: Props): JSX.Element => {
|
|||
fill="currentColor"
|
||||
height="1.2em"
|
||||
width="1.2em"
|
||||
preserveAspectRatio="xMidYMid meet"
|
||||
role="img"
|
||||
viewBox="0 0 40 40"
|
||||
className={clsx(styles.iconEdit, className)}
|
||||
aria-label="Edit page"
|
||||
aria-hidden="true"
|
||||
{...restProps}>
|
||||
<g>
|
||||
<path d="m34.5 11.7l-3 3.1-6.3-6.3 3.1-3q0.5-0.5 1.2-0.5t1.1 0.5l3.9 3.9q0.5 0.4 0.5 1.1t-0.5 1.2z m-29.5 17.1l18.4-18.5 6.3 6.3-18.4 18.4h-6.3v-6.2z" />
|
||||
|
|
|
|||
|
|
@ -15,10 +15,10 @@ const IconLanguage = ({
|
|||
}: Props): JSX.Element => {
|
||||
return (
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
viewBox="0 0 20 20"
|
||||
width={width}
|
||||
height={height}
|
||||
aria-hidden="true"
|
||||
{...props}>
|
||||
<path
|
||||
fill="currentColor"
|
||||
|
|
|
|||
|
|
@ -16,15 +16,12 @@ const IconMenu = ({
|
|||
}: Props): JSX.Element => {
|
||||
return (
|
||||
<svg
|
||||
aria-label="Menu"
|
||||
className={className}
|
||||
width={width}
|
||||
height={height}
|
||||
viewBox="0 0 30 30"
|
||||
role="img"
|
||||
focusable="false"
|
||||
aria-hidden="true"
|
||||
{...restProps}>
|
||||
<title>Menu</title>
|
||||
<path
|
||||
stroke="currentColor"
|
||||
strokeLinecap="round"
|
||||
|
|
|
|||
Loading…
Reference in New Issue