-
Notifications
You must be signed in to change notification settings - Fork 6
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
Fix aria-role description in grabDrag interaction #152
Comments
@zepumph, I started a little example walk-through for the This is just in case we need it. We may not. |
I added this above. Please have a look. |
@zepumph, I am hearing the aria-roledescription text again, but I am hearing things in a strange way. I hear the following:
Number 2. Is what I expect to hear with aria-roledescription in place. I thought I should hear "Grab Chemistry book, button" on focus, and possibly on release? What I think might be good is if it goes like this:
It seems focus is not being placed on the button on release, because after I release the Chemistry book, and if I press the Tab key, my focus goes to the same object again (e.g. the Chemistry book that I just released). I like the idea of not hearing the refocused button's label after a release, but I think that's how it is actually supposed to work. Questions for you?
|
@zepumph, I will complete the walk-through in the design document and discuss with @emily-phet today. |
@zepumph, I discussed the grab/release walk-through in the design document with @emily-phet. Is it possible to have difference
And on release, please return focus to the Grab Chemistry book, button. @zepumph, let me know if this is possible and/or if you have any questions. |
I'm glad you had a listen! I did quite a few bug fixes in relation to this topic. Here is what I fixed, please take a look:
A note about your above comment: Let me know what else you want for this. Perhaps we should align some time to talk so that we can get on the same page if my commits are in the wrong direction. |
@zepumph, I had a listen and it sounds good when interacting, but possibly problematic within VoiceOver's help text, as aria-roledescriptin replaces the name/label all together. I think for AT that supports "aria-roledescription", the text within the attribute becomes the name and function for the object (I'll check this). Thus, in VoiceOver's help text hint system, the object is referred to like this,
I should have made this more clear in the design document, but I think that the name/label of the object needs to be included in the <button>Grab Chemistry book</button>
<div role="application" aria-roledescription="Chemistry book, move in four directions">Chemistry book</div> And then on release <button>Grab Chemistry book</button>
<div role="application" aria-roledescription="Chemistry book, grab to move">Chemistry book</div> Or maybe it would work on release like this: <button>Grab Chemistry book</button>
<div role="application" aria-roledescription="Chemistry book">Chemistry book</div> I am having trouble finding the exact HTML with the inspector. Is it possible to paste in the HTML for me for these three states?
I could be wrong about this, but I think we might be having a little trouble because we are dealing with two elements, a normal Edited: removed "not" in fist sentence, and added "function" |
@zepumph, maybe the word, "moveable" is better than all this business of "move in in four directions" and "grab to move". I'll work on this in the design doc and assign aback to you when it is ready. |
@zepumph, I think I have a couple of options for us: Current code for Grab Chemistry book button: <button data-focusable="true"
id="332-415-678-437"
data-trail-id="332-415-678-437" aria-label="Grab Chemistry book"
aria-roledescription="grab to move">Grab Chemistry book</button> Current code for grabbed Chemistry book div: <div tabindex="0" data-focusable="true"
id="332-415-678-437" data-trail-id="332-415-678-437"
aria-label="Chemistry book"
aria-roledescription="move in four directions"
role="application">Chemistry book</div> Proposed code options for Grab Chemistry book button:
<button data-focusable="true"
id="332-415-678-437"
data-trail-id="332-415-678-437">Grab Chemistry book</button>
<button data-focusable="true"
id="332-415-678-437"
data-trail-id="332-415-678-437"
aria-roledescription="Grab Chemistry book button">Grab Chemistry book</button> Note: If an Proposed code options for grabbed Chemistry book div:
<div tabindex="0"
data-focusable="true"
id="332-415-678-437"
data-trail-id="332-415-678-437"
aria-label="Chemistry book"
aria-roledescription="Moveable Chemistry book"
role="application">Chemistry book</div>
<div tabindex="0"
data-focusable="true"
id="332-415-678-437"
data-trail-id="332-415-678-437"
aria-label="Moveable Chemistry book"
aria-roledescription="Moveable Chemistry book"
role="application">Moveable Chemistry book</div> Summary & Walk-through from Design Doc
|
@zepumph, I successfully fished out the code from the inspector and have provided the two options above. Assigning back to you. Please let me know if you have any questions. I think the changes, especially option 2 for the button, are straight forward. Note that options are kind of interchangeable. Ideally, we want the simplest code with the fewest number of attributes that sounds still sounds good in all AT. |
And @zepumph, thanks for all your work in #152 (comment) I think we are very close to closing this issue! |
For button, we will get rid of aria-label and aria-roledescription: <button data-focusable="true"
id="332-415-678-437"
data-trail-id="332-415-678-437">Grab Chemistry book</button> and the second option for the draggable <div tabindex="0"
data-focusable="true"
id="332-415-678-437"
data-trail-id="332-415-678-437"
aria-label="Moveable Chemistry book"
aria-roledescription="Moveable Chemistry book"
role="application">Moveable Chemistry book</div> |
… strings, A11yGrabDragNode should set accessibleName for draggable and grabbable, #152
… strings, A11yGrabDragNode should set accessibleName for draggable and grabbable, phetsims/friction#152
The above PDOM has been implemented. In general I really like all of the changes above. I moved some code from usages into the grab/drag js file. @terracoda let me know what you think! |
@zepumph, this is working great in VoiceOver! On grab, I like the way the VoiceOver Hint Text describes the grab button as a button (no name, but that's fine) and the grabbed objects with the appropriate Here's a couple screen shots to document VoiceOver's custom Hint Text: Thanks for all your work on a generalizable grab button! |
No description provided.
The text was updated successfully, but these errors were encountered: