Skip to content

Commit

Permalink
DataViews: set proper role for AddFilter's items (WordPress#56714)
Browse files Browse the repository at this point in the history
  • Loading branch information
oandregal authored Dec 1, 2023
1 parent b546c17 commit 3173848
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 0 additions & 2 deletions packages/edit-site/src/components/dataviews/add-filter.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,6 @@ export default function AddFilter( { fields, view, onChangeView } ) {
{ filter.elements.map( ( element ) => (
<DropdownMenuItem
key={ element.value }
role="menuitemradio"
aria-checked={ false }
onSelect={ () => {
onChangeView( ( currentView ) => ( {
...currentView,
Expand Down
4 changes: 2 additions & 2 deletions test/e2e/specs/site-editor/new-templates-list.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ test.describe( 'Templates', () => {
// Filter by author.
await page.getByRole( 'button', { name: 'Add filter' } ).click();
await page.getByRole( 'menuitem', { name: 'Author' } ).hover();
await page.getByRole( 'menuitemradio', { name: 'admin' } ).click();
await page.getByRole( 'menuitem', { name: 'admin' } ).click();
await expect( titles ).toHaveCount( 1 );
await expect( titles.first() ).toHaveText( 'Date Archives' );

Expand All @@ -77,7 +77,7 @@ test.describe( 'Templates', () => {
await expect( titles ).toHaveCount( 3 );
await page.getByRole( 'button', { name: 'Add filter' } ).click();
await page.getByRole( 'menuitem', { name: 'Author' } ).hover();
await page.getByRole( 'menuitemradio', { name: 'Emptytheme' } ).click();
await page.getByRole( 'menuitem', { name: 'Emptytheme' } ).click();
await expect( titles ).toHaveCount( 2 );
} );
test( 'Field visibility', async ( { admin, page } ) => {
Expand Down

0 comments on commit 3173848

Please sign in to comment.