Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[EuiStepsHorizontal] Added aria-disabled attribute when status is "disabled" #7699

Merged
merged 3 commits into from
Apr 18, 2024
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
3 changes: 3 additions & 0 deletions changelogs/upcoming/7699.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
**Accessibility**

- Added `aria-disabled` attribute to `EuiHorizontalSteps` when status is "disabled"
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ exports[`EuiStepHorizontal props status danger is rendered 1`] = `

exports[`EuiStepHorizontal props status disabled is rendered 1`] = `
<button
aria-disabled="true"
class="euiStepHorizontal emotion-euiStepHorizontal-disabled"
data-step-status="disabled"
title="Step 1 is disabled"
Expand Down Expand Up @@ -183,6 +184,7 @@ exports[`EuiStepHorizontal props status disabled is rendered 1`] = `

exports[`EuiStepHorizontal props status disabled overrides the passed status 1`] = `
<button
aria-disabled="true"
class="euiStepHorizontal emotion-euiStepHorizontal-disabled"
data-step-status="disabled"
disabled=""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ exports[`EuiStepsHorizontal is rendered 1`] = `
class="euiStepsHorizontal__item emotion-euiStepsHorizontal__item"
>
<button
aria-disabled="true"
class="euiStepHorizontal emotion-euiStepHorizontal-disabled"
data-step-status="disabled"
title="Step 4: Disabled Step 4 is disabled"
Expand Down
1 change: 1 addition & 0 deletions src/components/steps/step_horizontal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ export const EuiStepHorizontal: FunctionComponent<EuiStepHorizontalProps> = ({

return (
<button
aria-disabled={status === 'disabled' ? true : undefined}
className={classes}
title={titleAttr}
onClick={onStepClick}
Expand Down
Loading