Skip to content

Commit

Permalink
Merge pull request #450 from Lemoncode/fixbug/#444-Bug-inmodal-access…
Browse files Browse the repository at this point in the history
…ibility-issues

[READY_TO_REVIEW]Fixed accessibility bug in modal
  • Loading branch information
brauliodiez authored Apr 20, 2024
2 parents e765f09 + f6ea5c6 commit f6a8a41
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.container {
z-index: 2;
position: fixed;
top: 0;
left: 0;
Expand All @@ -12,7 +13,7 @@

.dialog {
position: relative;
z-index: 1;
z-index: 3;
background-color: var(--background-dialog);
color: var(--text-color);
width: 90%;
Expand All @@ -25,7 +26,7 @@
.dialog-header {
position: sticky;
top: 0;
z-index: 3;
z-index: 4;
display: flex;
gap: 10px;
align-items: center;
Expand Down
4 changes: 3 additions & 1 deletion src/common/components/modal-dialog/modal.dialog.bussines.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ export const handleFocus = (
'a[href], button, textarea, input[type="text"], input[type="radio"], input[type="checkbox"], select'
);
focusableElementsInside?.forEach((element: Element) => {
element.removeAttribute('tabindex');
if (element.ariaHidden !== 'true') {
element.removeAttribute('tabindex');
}
});
};

Expand Down

0 comments on commit f6a8a41

Please sign in to comment.