Closed GomezIvann closed 1 year ago
These are some of the strange behaviours I have found out for now:
If there is an element with a
tabIndex > 0
the focus can leave the dialogue. When using the shift tab from the first element it seems to need an extra step to focus on the last element.
The second case is already fixed. In regards to the first one, I couldn't reproduce it since in my code is working fine, could you please paste yours in a comment?
I just simply added a DxcButton
with tabIndex={1}
to the dialog.
Related to this issue using the shift tab I was nerver able to focus on the button with positive tabIndex.
I just simply added a
DxcButton
withtabIndex={1}
to the dialog. Related to this issue using the shift tab I was nerver able to focus on the button with positive tabIndex.
I saw the problem. When we change the tabIndex
of the inner content to a different value than the Dialog's one, it seems to lose the lock (understandable). I'm currently checking this since I'm not sure how it should work in this case.
I just simply added a
DxcButton
withtabIndex={1}
to the dialog. Related to this issue using the shift tab I was nerver able to focus on the button with positive tabIndex.I saw the problem. When we change the
tabIndex
of the inner content to a different value than the Dialog's one, it seems to lose the lock (understandable). I'm currently checking this since I'm not sure how it should work in this case.
One more thing I noticed is that if the first element has tabIndex > 0
it is still autofocused even if there are elements with higher priority.
I just simply added a
DxcButton
withtabIndex={1}
to the dialog. Related to this issue using the shift tab I was nerver able to focus on the button with positive tabIndex.I saw the problem. When we change the
tabIndex
of the inner content to a different value than the Dialog's one, it seems to lose the lock (understandable). I'm currently checking this since I'm not sure how it should work in this case.One more thing I noticed is that if the first element has
tabIndex > 0
it is still autofocused even if there are elements with higher priority.
That's because that's not how tabIndex
works. Here, the main goal is to autofocus the first available focusable item of the Dialog
. By changing the value of its tabIndex
you are only establishing a different order in the normal sequence of tabbable elements. tabIndex
is not used for autofocusing, for that kind of purpose is the autofocus
property (which is what we are trying to reproduce).
You can take a look at other implementations to check this:
Checklist
/lib
directory./website
as needed.Description Summary:
padding-top
removed (#1446). Now, when displayed, the decision of how to avoid the clear action button relies on the user.800px
to696px
.Escape
key. When the dialog didn't have any component to bubble theonkeydown
event, the key didn't close the modal box. For example, a Dialog with only text.fontFamily
,fontSize
andfontWeight
.Closes #1446 #1470 #1485 #1496