Skip to content

Commit

Permalink
Adding aria-labels to example modals.
Browse files Browse the repository at this point in the history
  • Loading branch information
1Copenut committed Mar 8, 2024
1 parent fcee44e commit 52622ce
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 3 deletions.
2 changes: 2 additions & 0 deletions src-docs/src/views/modal/confirm_modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export default () => {
if (isModalVisible) {
modal = (
<EuiConfirmModal
aria-label="EuiModal confirm example"
style={{ width: 600 }}
title="Update subscription to Platinum?"
onCancel={closeModal}
Expand All @@ -44,6 +45,7 @@ export default () => {
if (isDestroyModalVisible) {
destroyModal = (
<EuiConfirmModal
aria-label="EuiModal confirm example two"
title="Discard dashboard changes?"
onCancel={closeDestroyModal}
onConfirm={closeDestroyModal}
Expand Down
1 change: 1 addition & 0 deletions src-docs/src/views/modal/confirm_modal_loading.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ export default () => {
if (isModalVisible) {
modal = (
<EuiConfirmModal
aria-label="EuiModal confirm loading"
title="Delete the EUI repo?"
onCancel={closeModal}
onConfirm={() => {
Expand Down
2 changes: 1 addition & 1 deletion src-docs/src/views/modal/modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default () => {

if (isModalVisible) {
modal = (
<EuiModal onClose={closeModal}>
<EuiModal aria-label="EuiModal example" onClose={closeModal}>
<EuiModalHeader>
<EuiModalHeaderTitle>Modal title</EuiModalHeaderTitle>
</EuiModalHeader>
Expand Down
6 changes: 5 additions & 1 deletion src-docs/src/views/modal/modal_form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,11 @@ export default () => {

if (isModalVisible) {
modal = (
<EuiModal onClose={closeModal} initialFocus="[name=popswitch]">
<EuiModal
aria-label="EuiModal form example"
onClose={closeModal}
initialFocus="[name=popswitch]"
>
<EuiModalHeader>
<EuiModalHeaderTitle>Modal title</EuiModalHeaderTitle>
</EuiModalHeader>
Expand Down
6 changes: 5 additions & 1 deletion src-docs/src/views/modal/modal_width.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@ export default () => {

if (isModalVisible) {
modal = (
<EuiModal style={{ width: 800 }} onClose={closeModal}>
<EuiModal
aria-label="EuiModal modal width"
style={{ width: 800 }}
onClose={closeModal}
>
<EuiModalHeader>
<EuiModalHeaderTitle>Modal title</EuiModalHeaderTitle>
</EuiModalHeader>
Expand Down

0 comments on commit 52622ce

Please sign in to comment.