Skip to content

Commit

Permalink
Allow screenreader to read the status of the action type in Webhooks …
Browse files Browse the repository at this point in the history
…(#52264)
  • Loading branch information
hectorsector authored Sep 11, 2024
1 parent 56e33ad commit b49d31f
Showing 1 changed file with 10 additions and 15 deletions.
25 changes: 10 additions & 15 deletions src/webhooks/components/Webhook.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -167,25 +167,20 @@ export function Webhook({ webhook }: Props) {
<div className="mb-4">
<div className="mb-3">
<ActionMenu>
<ActionMenu.Button
aria-label="Select a webhook action type"
className="text-normal"
>
<ActionMenu.Button className="text-normal">
{t('action_type')}: <span className="text-bold">{currentWebhookActionType}</span>
</ActionMenu.Button>
<ActionMenu.Overlay>
<ActionList selectionVariant="single">
{webhook.actionTypes.map((type, index) => {
return (
<ActionList.Item
selected={index === selectedActionTypeIndex}
key={`${webhook.name}-${type}`}
onSelect={() => handleActionTypeChange(type, index)}
>
{type}
</ActionList.Item>
)
})}
{webhook.actionTypes.map((type, index) => (
<ActionList.Item
key={`${webhook.name}-${type}`}
selected={index === selectedActionTypeIndex}
onSelect={() => handleActionTypeChange(type, index)}
>
{type}
</ActionList.Item>
))}
</ActionList>
</ActionMenu.Overlay>
</ActionMenu>
Expand Down

0 comments on commit b49d31f

Please sign in to comment.