Merge pull request #11232 from bridgetbarnes/catalog-entities-MoreVert-aria-label
Fix invalid aria- attribute
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-catalog': patch
|
||||
---
|
||||
|
||||
Lighthouse was reporting this button as having invalid aria- values, as the popover doesn't exist until clicked. This adds additional labels to the button to make it valid aria
|
||||
@@ -109,9 +109,12 @@ export function EntityContextMenu(props: EntityContextMenuProps) {
|
||||
aria-label="more"
|
||||
aria-controls="long-menu"
|
||||
aria-haspopup="true"
|
||||
aria-expanded={!!anchorEl}
|
||||
role="button"
|
||||
onClick={onOpen}
|
||||
data-testid="menu-button"
|
||||
className={classes.button}
|
||||
id="long-menu"
|
||||
>
|
||||
<MoreVert />
|
||||
</IconButton>
|
||||
@@ -121,6 +124,7 @@ export function EntityContextMenu(props: EntityContextMenuProps) {
|
||||
anchorEl={anchorEl}
|
||||
anchorOrigin={{ vertical: 'bottom', horizontal: 'right' }}
|
||||
transformOrigin={{ vertical: 'top', horizontal: 'right' }}
|
||||
aria-labelledby="long-menu"
|
||||
>
|
||||
<MenuList>
|
||||
{extraItems}
|
||||
|
||||
Reference in New Issue
Block a user