Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions packages/manager/.changeset/pr-11167-fixed-1730095848948.md
Original file line number Diff line number Diff line change
@@ -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))
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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)
? {
Expand Down Expand Up @@ -110,10 +118,7 @@ export const LinodeNetworkingActionMenu = (props: Props) => {
);
})}
{matchesMdDown && (
<ActionMenu
actionsList={actions}
ariaLabel={`Action menu for IP Address ${props.ipAddress}`}
/>
<ActionMenu actionsList={actions} ariaLabel={getAriaLabel()} />
)}
</>
) : (
Expand Down