File tree Expand file tree Collapse file tree 4 files changed +8
-1
lines changed
e2e/__tests__/app-impress
features/docs/doc-tree/components Expand file tree Collapse file tree 4 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ and this project adheres to
1515 - ♿ improve accessibility by adding landmark roles to layout #1394
1616 - ♿ add document visible in list and openable via enter key #1365
1717 - ♿ add pdf outline property to enable bookmarks display #1368
18+ - ♿ hide decorative icons from assistive tech with aria-hidden #1404
1819
1920### Fixed
2021
Original file line number Diff line number Diff line change @@ -63,5 +63,5 @@ export const clickOnAddRootSubPage = async (page: Page) => {
6363 const rootItem = page . getByTestId ( 'doc-tree-root-item' ) ;
6464 await expect ( rootItem ) . toBeVisible ( ) ;
6565 await rootItem . hover ( ) ;
66- await rootItem . getByRole ( 'button' , { name : 'add_box' } ) . click ( ) ;
66+ await rootItem . getByRole ( 'button' , { name : / a d d s u b p a g e / i } ) . click ( ) ;
6767} ;
Original file line number Diff line number Diff line change @@ -12,9 +12,14 @@ export const Icon = ({
1212 variant = 'outlined' ,
1313 ...textProps
1414} : IconProps ) => {
15+ const hasLabel = 'aria-label' in textProps || 'aria-labelledby' in textProps ;
16+ const ariaHidden =
17+ 'aria-hidden' in textProps ? textProps [ 'aria-hidden' ] : ! hasLabel ;
18+
1519 return (
1620 < Text
1721 { ...textProps }
22+ aria-hidden = { ariaHidden }
1823 className = { clsx ( '--docs--icon-bg' , textProps . className , {
1924 'material-icons-filled' : variant === 'filled' ,
2025 'material-icons' : variant === 'outlined' ,
Original file line number Diff line number Diff line change @@ -181,6 +181,7 @@ export const DocTreeItemActions = ({
181181 } ) ;
182182 } }
183183 color = "primary"
184+ aria-label = { t ( 'Add subpage' ) }
184185 >
185186 < Icon
186187 variant = "filled"
You can’t perform that action at this time.
0 commit comments