Skip to content

Commit

Permalink
[a11y] Fix: Use spans instead of headings on dataviews table view pag…
Browse files Browse the repository at this point in the history
…e title.
  • Loading branch information
jorgefilipecosta committed Dec 11, 2023
1 parent 275e833 commit 950af13
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
9 changes: 6 additions & 3 deletions packages/edit-site/src/components/page-pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* WordPress dependencies
*/
import {
__experimentalHeading as Heading,
__experimentalView as View,
__experimentalVStack as VStack,
} from '@wordpress/components';
import { __ } from '@wordpress/i18n';
Expand Down Expand Up @@ -216,7 +216,10 @@ export default function PagePages() {
render: ( { item } ) => {
return (
<VStack spacing={ 1 }>
<Heading as="h3" level={ 5 } weight={ 500 }>
<View
as="span"
className="edit-site-page-pages__list-view-title-field"
>
{ [ LAYOUT_TABLE, LAYOUT_GRID ].includes(
view.type
) ? (
Expand All @@ -236,7 +239,7 @@ export default function PagePages() {
item.title?.rendered || item.slug
) || __( '(no title)' )
) }
</Heading>
</View>
</VStack>
);
},
Expand Down
6 changes: 6 additions & 0 deletions packages/edit-site/src/components/page-pages/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,9 @@
width: $grid-unit-40;
height: $grid-unit-40;
}


.edit-site-page-pages__list-view-title-field {
font-size: 1.3em;
font-weight: 500;
}

0 comments on commit 950af13

Please sign in to comment.