WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED INVALID
189379
AX: The title of an input contained in a label should participate in the accessible name calculation
https://bugs.webkit.org/show_bug.cgi?id=189379
Summary
AX: The title of an input contained in a label should participate in the acce...
Joanmarie Diggs
Reported
2018-09-06 15:37:39 PDT
Given this test case: <label for="test">foo <input id="test" type="button" name="test" title="bar"> baz</label> The accessible name of the input should be "foo bar baz". Currently it is "foo baz" because we are not falling back on the title attribute of inputs which lack displayed text.
Attachments
Patch
(6.05 KB, patch)
2018-09-06 15:45 PDT
,
Joanmarie Diggs
no flags
Details
Formatted Diff
Diff
Archive of layout-test-results from ews204 for win-future
(12.81 MB, application/zip)
2018-09-06 17:17 PDT
,
EWS Watchlist
no flags
Details
Patch
(7.01 KB, patch)
2018-09-06 17:25 PDT
,
Joanmarie Diggs
no flags
Details
Formatted Diff
Diff
Archive of layout-test-results from ews201 for win-future
(12.77 MB, application/zip)
2018-09-06 19:56 PDT
,
EWS Watchlist
no flags
Details
Archive of layout-test-results from ews200 for win-future
(12.93 MB, application/zip)
2018-09-06 20:59 PDT
,
EWS Watchlist
no flags
Details
trying to make win EWS happy
(7.91 KB, patch)
2018-09-07 11:09 PDT
,
Joanmarie Diggs
no flags
Details
Formatted Diff
Diff
Archive of layout-test-results from ews202 for win-future
(12.83 MB, application/zip)
2018-09-07 13:08 PDT
,
EWS Watchlist
no flags
Details
trying to make win EWS happy
(7.92 KB, patch)
2018-09-07 14:36 PDT
,
Joanmarie Diggs
cfleizach
: review+
Details
Formatted Diff
Diff
Show Obsolete
(7)
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2018-09-06 15:37:53 PDT
<
rdar://problem/44200580
>
Joanmarie Diggs
Comment 2
2018-09-06 15:45:38 PDT
Created
attachment 349085
[details]
Patch
EWS Watchlist
Comment 3
2018-09-06 17:17:32 PDT
Comment on
attachment 349085
[details]
Patch
Attachment 349085
[details]
did not pass win-ews (win): Output:
https://webkit-queues.webkit.org/results/9120037
New failing tests: accessibility/label-with-input-with-title.html
EWS Watchlist
Comment 4
2018-09-06 17:17:43 PDT
Created
attachment 349096
[details]
Archive of layout-test-results from ews204 for win-future The attached test failures were seen while running run-webkit-tests on the win-ews. Bot: ews204 Port: win-future Platform: CYGWIN_NT-6.1-2.10.0-0.325-5-3-x86_64-64bit
Joanmarie Diggs
Comment 5
2018-09-06 17:25:39 PDT
Created
attachment 349098
[details]
Patch
Nan Wang
Comment 6
2018-09-06 18:01:52 PDT
Comment on
attachment 349098
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=349098&action=review
> Source/WebCore/accessibility/AccessibilityNodeObject.cpp:1788 > + if (childText.isEmpty() && is<HTMLInputElement>(child->node()))
Do we want to consider elements other than inputs?
> LayoutTests/platform/mac/accessibility/label-with-input-with-title-expected.txt:9 > + AXTitleUIElement: non-null
Can you try to see if the name calculation is included in the stringValue() on mac platform?
EWS Watchlist
Comment 7
2018-09-06 19:56:46 PDT
Comment on
attachment 349098
[details]
Patch
Attachment 349098
[details]
did not pass win-ews (win): Output:
https://webkit-queues.webkit.org/results/9121458
New failing tests: accessibility/label-with-input-with-title.html
EWS Watchlist
Comment 8
2018-09-06 19:56:58 PDT
Created
attachment 349106
[details]
Archive of layout-test-results from ews201 for win-future The attached test failures were seen while running run-webkit-tests on the win-ews. Bot: ews201 Port: win-future Platform: CYGWIN_NT-6.1-2.10.0-0.325-5-3-x86_64-64bit
EWS Watchlist
Comment 9
2018-09-06 20:59:23 PDT
Comment on
attachment 349098
[details]
Patch
Attachment 349098
[details]
did not pass win-ews (win): Output:
https://webkit-queues.webkit.org/results/9122159
New failing tests: accessibility/label-with-input-with-title.html
EWS Watchlist
Comment 10
2018-09-06 20:59:35 PDT
Created
attachment 349108
[details]
Archive of layout-test-results from ews200 for win-future The attached test failures were seen while running run-webkit-tests on the win-ews. Bot: ews200 Port: win-future Platform: CYGWIN_NT-6.1-2.9.0-0.318-5-3-x86_64-64bit
Joanmarie Diggs
Comment 11
2018-09-07 11:05:39 PDT
(In reply to Nan Wang from
comment #6
)
> Comment on
attachment 349098
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=349098&action=review
> > > Source/WebCore/accessibility/AccessibilityNodeObject.cpp:1788 > > + if (childText.isEmpty() && is<HTMLInputElement>(child->node())) > > Do we want to consider elements other than inputs?
Maybe. What I'm doing at the moment is debugging and fixing AccName spec test failures so that AccName will be able to successfully exit CR and become a proposed recommendation. As I continue doing so, I may stumble across other instances where we're failing to include the title attribute of non-input elements. In which case the answer to your question will become "yes" and I'll submit a patch for that. If you have other elements you'd like me to consider, I'm happy to do so -- though we should probably ensure that jibes with what's in AccName and HTML-AAM and file issues against those specs if it doesn't.
> > LayoutTests/platform/mac/accessibility/label-with-input-with-title-expected.txt:9 > > + AXTitleUIElement: non-null > > Can you try to see if the name calculation is included in the stringValue() > on mac platform?
I'm not seeing it. Speaking of which: It was my assumption that in this instance, VoiceOver would build up the label to be presented from the descendants of the AXTitleUIElement, but VoiceOver is not presenting the "bar" when each widget in the test case gets focus. So.... Where should this be exposed so that VoiceOver says "foo bar baz" when presenting the label of the focused widget?
Joanmarie Diggs
Comment 12
2018-09-07 11:09:29 PDT
Created
attachment 349164
[details]
trying to make win EWS happy
EWS Watchlist
Comment 13
2018-09-07 13:07:50 PDT
Comment on
attachment 349164
[details]
trying to make win EWS happy
Attachment 349164
[details]
did not pass win-ews (win): Output:
https://webkit-queues.webkit.org/results/9131414
New failing tests: accessibility/label-with-input-with-title.html
EWS Watchlist
Comment 14
2018-09-07 13:08:01 PDT
Created
attachment 349181
[details]
Archive of layout-test-results from ews202 for win-future The attached test failures were seen while running run-webkit-tests on the win-ews. Bot: ews202 Port: win-future Platform: CYGWIN_NT-6.1-2.10.0-0.325-5-3-x86_64-64bit
Joanmarie Diggs
Comment 15
2018-09-07 14:36:09 PDT
Created
attachment 349192
[details]
trying to make win EWS happy
Joanmarie Diggs
Comment 16
2018-09-07 16:04:41 PDT
Comment on
attachment 349192
[details]
trying to make win EWS happy Hey Chris. If my answer to my earlier question is easy, then I'll do a new patch here to fix both of our platforms. Otherwise, please review. For convenience, this is the question I'm wondering about:
> It was my assumption that in this instance, VoiceOver would build > up the label to be presented from the descendants of the AXTitleUIElement, > but VoiceOver is not presenting the "bar" when each widget in the test case > gets focus. So.... Where should this be exposed so that VoiceOver says > "foo bar baz" when presenting the label of the focused widget?
Thanks!
chris fleizach
Comment 17
2018-09-07 16:11:18 PDT
(In reply to Joanmarie Diggs (irc: joanie) from
comment #16
)
> Comment on
attachment 349192
[details]
> trying to make win EWS happy > > Hey Chris. > > If my answer to my earlier question is easy, then I'll do a new patch here > to fix both of our platforms. Otherwise, please review. > > For convenience, this is the question I'm wondering about: > > > It was my assumption that in this instance, VoiceOver would build > > up the label to be presented from the descendants of the AXTitleUIElement, > > but VoiceOver is not presenting the "bar" when each widget in the test case > > gets focus. So.... Where should this be exposed so that VoiceOver says > > "foo bar baz" when presenting the label of the focused widget?
Yea I think in this case the title UI element is exposed and VO calculates the name based on all the elements. So I guess this is correct, but I admit it's a bit of a weird discrepancy.
> > Thanks!
Nan Wang
Comment 18
2018-09-07 16:21:31 PDT
Comment on
attachment 349098
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=349098&action=review
>>> LayoutTests/platform/mac/accessibility/label-with-input-with-title-expected.txt:9 >>> + AXTitleUIElement: non-null >> >> Can you try to see if the name calculation is included in the stringValue() on mac platform? > > I'm not seeing it. Speaking of which: It was my assumption that in this instance, VoiceOver would build up the label to be presented from the descendants of the AXTitleUIElement, but VoiceOver is not presenting the "bar" when each widget in the test case gets focus. So.... Where should this be exposed so that VoiceOver says "foo bar baz" when presenting the label of the focused widget?
I think there's a containsOnlyStaticText() in AccessibilityLabel. Maybe we should add this case in that check?
Nan Wang
Comment 19
2018-09-07 16:26:44 PDT
Comment on
attachment 349098
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=349098&action=review
>>>> LayoutTests/platform/mac/accessibility/label-with-input-with-title-expected.txt:9 >>>> + AXTitleUIElement: non-null >>> >>> Can you try to see if the name calculation is included in the stringValue() on mac platform? >> >> I'm not seeing it. Speaking of which: It was my assumption that in this instance, VoiceOver would build up the label to be presented from the descendants of the AXTitleUIElement, but VoiceOver is not presenting the "bar" when each widget in the test case gets focus. So.... Where should this be exposed so that VoiceOver says "foo bar baz" when presenting the label of the focused widget? > > I think there's a containsOnlyStaticText() in AccessibilityLabel. Maybe we should add this case in that check?
Anyway I think you are right that things are exposed in AXTitleUIElement
Joanmarie Diggs
Comment 20
2018-09-11 13:03:53 PDT
Hey Chris and Nan. Thanks for the info! I looked into it some more today. Responses inline below. (In reply to chris fleizach from
comment #17
)
> Yea I think in this case the title UI element is exposed
Correct.
> and VO calculates the name based on all the elements.
Ok, but VO is not fully succeeding. The descendants of the AXTitleUIElement (an AccessibilityLabel) are: * "foo" (text) * "bar" (the title attribute value of an input with type button or checkbox) * "baz" (text) VO's calculation is "foo baz". CANDIDATE SOLUTION 1: In this particular case, "bar" is exposed as the AXHelp value of the input. So VO *could* present it without our making any further changes in WebKit, if you change VO to fall back on AXHelp. (In reply to Nan Wang from
comment #18
)
> I think there's a containsOnlyStaticText() in AccessibilityLabel. Maybe we > should add this case in that check?
Do you mean modify containsOnlyStaticText()? If so, I don't think that's the right thing to do. In the test cases in question, the AccessibilityLabel does NOT contain only static text. It contains widgets. As a result containsOnlyStaticText() returns false -- I would argue that is the correct return value and that this case is already in that check. Or were you instead suggesting we add a call to containsOnlyStaticText() in AccessibilityRenderObject::exposesTitleUIElement()? i.e. if the AccessibilityLabel does NOT contain only static text, it doesn't expose a title UI element? If so, that works for me. We already treat labels which contain unrelated controls as not being a valid title UI element. CANDIDATE SOLUTION 2: Complicated labels should not be treated a valid title UI element; instead their calculated value should be exposed via AXTitle. As an experiment, I tried seeing what would happen if the calculated result included an AXTitle value but the AXTitleUIElement continued to be exposed. The answer, which I'm guessing you already knew, is that VO presents both. I'm also guessing that it is by design and thus modifying VO to ignore AXTitleUIElement when there is an AXTitle is not a solution. But if I'm wrong about that, please let me know. So.... Do you want the fix in VO or in WebKit. If the latter, are you cool with CANDIDATE SOLUTION 2?
chris fleizach
Comment 21
2018-09-11 13:57:26 PDT
(In reply to Joanmarie Diggs (irc: joanie) from
comment #20
)
> Hey Chris and Nan. > > Thanks for the info! I looked into it some more today. Responses inline > below. > > (In reply to chris fleizach from
comment #17
) > > > Yea I think in this case the title UI element is exposed > > Correct. > > > and VO calculates the name based on all the elements. > > Ok, but VO is not fully succeeding. The descendants of the AXTitleUIElement > (an AccessibilityLabel) are: > > * "foo" (text) > * "bar" (the title attribute value of an input with type button or checkbox) > * "baz" (text) > > VO's calculation is "foo baz". > > CANDIDATE SOLUTION 1: In this particular case, "bar" is exposed as the > AXHelp value of the input. So VO *could* present it without our making any > further changes in WebKit, if you change VO to fall back on AXHelp. >
Should title be exposed as AXHelp here? it seems that if this is the name calculation algorithm, title is no longer considered "help" text but part of the label...
> (In reply to Nan Wang from
comment #18
) > > > I think there's a containsOnlyStaticText() in AccessibilityLabel. Maybe we > > should add this case in that check? > > Do you mean modify containsOnlyStaticText()? If so, I don't think that's the > right thing to do. In the test cases in question, the AccessibilityLabel > does NOT contain only static text. It contains widgets. As a result > containsOnlyStaticText() returns false -- I would argue that is the correct > return value and that this case is already in that check. > > Or were you instead suggesting we add a call to containsOnlyStaticText() in > AccessibilityRenderObject::exposesTitleUIElement()? i.e. if the > AccessibilityLabel does NOT contain only static text, it doesn't expose a > title UI element? If so, that works for me. We already treat labels which > contain unrelated controls as not being a valid title UI element. > > CANDIDATE SOLUTION 2: Complicated labels should not be treated a valid title > UI element; instead their calculated value should be exposed via AXTitle. > > As an experiment, I tried seeing what would happen if the calculated result > included an AXTitle value but the AXTitleUIElement continued to be exposed. > The answer, which I'm guessing you already knew, is that VO presents both. > I'm also guessing that it is by design and thus modifying VO to ignore > AXTitleUIElement when there is an AXTitle is not a solution. But if I'm > wrong about that, please let me know. > > So.... Do you want the fix in VO or in WebKit. If the latter, are you cool > with CANDIDATE SOLUTION 2?
Joanmarie Diggs
Comment 22
2018-09-11 14:34:22 PDT
(In reply to chris fleizach from
comment #21
)
> Should title be exposed as AXHelp here? it seems that if this is the name > calculation algorithm, title is no longer considered "help" text but part of > the label...
Good question. I just asked it:
https://github.com/w3c/html-aam/issues/148
Executive summary is that if you read the HTML AAM literally, I believe it should indeed be exposed as AXHelp here. Whether or not that's what is correct or intended is another matter.
Joanmarie Diggs
Comment 23
2018-09-11 14:40:07 PDT
On a different note, I gave CANDIDATE SOLUTION 2 a try. In macOS it fixes (in my mind) the test case in this bug, namely AXTitle is "foo bar baz" and AXTitleUIElement is null. But it does break 5 tests, all of which expect an AXTitleUIElement which no longer exists: * double-title.html * label-elements-exposed-as-title-ui-elements.html * radio-button-title-label.html * secure-textfield-title-ui.html * title-ui-element-correctness.html You happen to have an opinion on if this solution is correct and we just need to update the tests, or if this is the wrong approach?
chris fleizach
Comment 24
2018-09-11 14:46:37 PDT
(In reply to Joanmarie Diggs (irc: joanie) from
comment #23
)
> On a different note, I gave CANDIDATE SOLUTION 2 a try. In macOS it fixes > (in my mind) the test case in this bug, namely AXTitle is "foo bar baz" and > AXTitleUIElement is null. But it does break 5 tests, all of which expect an > AXTitleUIElement which no longer exists: > > * double-title.html > * label-elements-exposed-as-title-ui-elements.html > * radio-button-title-label.html > * secure-textfield-title-ui.html > * title-ui-element-correctness.html > > You happen to have an opinion on if this solution is correct and we just > need to update the tests, or if this is the wrong approach?
Let me ask around here
Joanmarie Diggs
Comment 25
2018-09-12 08:26:12 PDT
I'm going to close this as invalid for now. The ARIA Working Group's test expectations state that the "foo bar baz" is the right result. And based on AccName step 2E, it is. But AccName step 2D seems to preempt that calculation from occurring. Sorry for the noise!
chris fleizach
Comment 26
2018-09-12 08:57:31 PDT
(In reply to chris fleizach from
comment #24
)
> (In reply to Joanmarie Diggs (irc: joanie) from
comment #23
) > > On a different note, I gave CANDIDATE SOLUTION 2 a try. In macOS it fixes > > (in my mind) the test case in this bug, namely AXTitle is "foo bar baz" and > > AXTitleUIElement is null. But it does break 5 tests, all of which expect an > > AXTitleUIElement which no longer exists: > > > > * double-title.html > > * label-elements-exposed-as-title-ui-elements.html > > * radio-button-title-label.html > > * secure-textfield-title-ui.html > > * title-ui-element-correctness.html > > > > You happen to have an opinion on if this solution is correct and we just > > need to update the tests, or if this is the wrong approach? > > Let me ask around here
It seems like it might be ok to collapse title elements into one label on the Mac The next time we have this issue might be worth checking out
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug