diff --git a/packages/manager/.changeset/pr-11167-fixed-1730095848948.md b/packages/manager/.changeset/pr-11167-fixed-1730095848948.md new file mode 100644 index 00000000000..1aeb90eeca0 --- /dev/null +++ b/packages/manager/.changeset/pr-11167-fixed-1730095848948.md @@ -0,0 +1,5 @@ +--- +"@linode/manager": Fixed +--- + +aria label of action menu button in IP address table row ([#11167](https://github.com/linode/manager/pull/11167)) diff --git a/packages/manager/src/features/Linodes/LinodesDetail/LinodeNetworking/LinodeNetworkingActionMenu.tsx b/packages/manager/src/features/Linodes/LinodesDetail/LinodeNetworking/LinodeNetworkingActionMenu.tsx index 0bb9e1ac7ae..d5afac3024a 100644 --- a/packages/manager/src/features/Linodes/LinodesDetail/LinodeNetworking/LinodeNetworkingActionMenu.tsx +++ b/packages/manager/src/features/Linodes/LinodesDetail/LinodeNetworking/LinodeNetworkingActionMenu.tsx @@ -14,7 +14,7 @@ import type { Theme } from '@mui/material/styles'; import type { Action } from 'src/components/ActionMenu/ActionMenu'; interface Props { - ipAddress?: IPAddress | IPRange; + ipAddress: IPAddress | IPRange; ipType: IPTypes; isOnlyPublicIP: boolean; isVPCOnlyLinode: boolean; @@ -59,6 +59,14 @@ export const LinodeNetworkingActionMenu = (props: Props) => { ? 'Linodes must have at least one public IP' : undefined; + const getAriaLabel = (): string => { + if ('address' in ipAddress) { + return `Action menu for IP Address ${ipAddress.address}`; + } else { + return `Action menu for IP Address ${ipAddress.range}`; + } + }; + const actions = [ onRemove && ipAddress && !is116Range && deletableIPTypes.includes(ipType) ? { @@ -110,10 +118,7 @@ export const LinodeNetworkingActionMenu = (props: Props) => { ); })} {matchesMdDown && ( - + )} ) : (