-
Notifications
You must be signed in to change notification settings - Fork 0
(User testing only) Keyboard accessibility for the imagedropdown and images fields #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
Conversation
a172904 to
f0991ff
Compare
| button.setAttribute('aria-selected', 'true'); | ||
| this.activeDescendantIndex = i; | ||
| contentDiv.setAttribute('aria-activedescendant', button.id); | ||
| button.setAttribute('class', `blocklyDropDownButton ${e ? "blocklyDropDownButtonHover" : "blocklyDropDownButtonFocus"}`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is setting a keyboard focus indicator on the currently selected icon when the dropdown is opened by anything other than a mouse event. Ideally, we'd only do this when we knew it was a keyboard event. The same code is in the field_images.ts file.
Deploying review-pxt with
|
| Latest commit: |
3a046e7
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://ec3f6a5b.review-pxt.pages.dev |
| Branch Preview URL: | https://image-dropdown.review-pxt.pages.dev |
3a046e7 to
7781286
Compare
|
Not deleting the branch as we may resurrect this one. |
We intend to merge this into a user testing branch only. The longer term plan is to move these fields over from extending Blockly's dropdown field to extending Blockly's grid field after recent improvements to the keyboard navigation for that field.
We are still waiting for the grid field to be more open to the types of items it can take, see RaspberryPiFoundation/blockly-samples#2482.