-
Notifications
You must be signed in to change notification settings - Fork 8
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
Icon buttons used in toolbar is not getting 'tabindex' value '0' when clicked #1422
Comments
I believe the issue is related to the |
I created microsoft/fast#6819 to track the underlying issue in the FAST toolbar. However, we should also evaluate whether adding |
…hen clicking on the icon (#1503) # Pull Request ## 🤨 Rationale <!--- Provide some background and a description of your work. What problem does this change solve? Include links to issues, work items, or other discussions. --> Partial fix for #1422 **Before fix**: `tabindex` value of the icon buttons in the toolbar not getting updated when clicking on the icon. **After fix**: `tabindex` value of the icon buttons in the toolbar gets updated when clicked on the icon. With the fix, the last clicked button(anywhere in the button) will get the focus when tabbing to the footer section next time. ## 👩💻 Implementation <!--- Describe how the change addresses the problem. Consider factors such as complexity, alternative solutions, performance impact, etc. Consider listing files with important changes or comment on them directly in the pull request. --> As mentioned in this comment (#1422 (comment)), adding `pointer-events: none;` to all the icons used inside the `nimble-toggle-button`. ## 🧪 Testing <!--- Detail the testing done to ensure this submission meets requirements. Include automated/manual test additions or modifications, testing done on a local build, private CI run results, and additional testing not covered by automatic pull request validation. If any functionality is not covered by automated testing, provide justification. --> - Verified the `tabindex` value after clicking on and around the icon in the buttons. - Written test cases to check if clicking the slot content actually updates the `tabindex` value of the button. ## ✅ Checklist <!--- Review the list and put an x in the boxes that apply or ~~strike through~~ around items that don't (along with an explanation). --> - [x] I have updated the project documentation to reflect my changes or determined no changes are needed.
Marking as blocked to reflect the dependency on the FAST issue. |
# Pull Request ## 🤨 Rationale The latest version of fast-foundation has fixes for two of our toolbar issues, so this PR pulls in the latest version. Resolves #1422 Resolves #1423 ## 👩💻 Implementation Bump version in package file Update the rich-text-editor page object to adjust for a change in the toolbar code ## 🧪 Testing Used storybook to verify that the two toolbar issues are resolved ## ✅ Checklist <!--- Review the list and put an x in the boxes that apply or ~~strike through~~ around items that don't (along with an explanation). --> - [ ] I have updated the project documentation to reflect my changes or determined no changes are needed.
🐛 Bug Report
When using buttons with icons within the
nimble-toolbar
and clicking on the icon, the button does not receive atabindex=0
. By default, the first button in the toolbar possesses atabindex=0
, whereas the remaining buttons have atabindex=-1
. Consequently, upon pressing theTab
key to shift focus from the previously selected field to the buttons, the focus does not transition to the button that was most recently clicked.💻 Repro or Code Sample
nimble-toolbar
.tabindex
value.tabindex=-1
.tabindex
value in the dev tools.🤔 Expected Behavior
The button which is clicked should be updated to
tabindex=0
. Also, the button which hastabindex=0
previously should be updated totabindex=-1
.😯 Current Behavior
The button which is clicked is not updated to
tabindex=0
when clicking on the icon. However, when clicking the button and not on the icon, thetabindex=0
. However, upon clicking outside the icon, thetabindex
gets updated.💁 Possible Solution
Add
pointer-events: none;
tostart
orend
slots where the icon is placed.🔦 Context
In
nimble-rich-text-editor
component, for footer formatting options we usenimble-toolbar
with thenimble-toggle-button
just the icon enabled with it. For more details, see: #1416 (comment) (issue 2)Currently,nimble-rich-text-editor
has the workaround fix as mentioned in the possible solution, and here is the link to the PR: #1503. Once the actual fix is implemented, the workaround in the editor styles should be removed.🌍 Your Environment
The text was updated successfully, but these errors were encountered: