DescriptionMac accessibility: only use AXTitleUIElement if that element has valid text.
On Mac OS X, the accessible name of an object can be exposed in three
different ways:
AXTitle: for visible text
AXDescription: for accessible text (like image "alt" or aria-label)
AXTitleUIElement: for controls labeled by another element
VoiceOver is kind of picky, it only wants us to expose just one of the
three, not multiple ones, but to be more confusing it ignores
AXTitleUIElement if it's not a control.
The bug here was that there was an obscure case where a checkbox's
name came from a label, but the label's text was "hidden" by a
heuristic that tries to combine the checkbox and its text into a
single element for simplicity. All of that is fine, but we were
exposing AXTitleUIElement for the checkbox when the element it
pointed to had empty text.
The fix is just to make sure the element pointed to by
AXTitleUIElement actually has text, otherwise we fall back on
AXTitle.
BUG=646846
Committed: https://crrev.com/837c2040011f4431c0e9e7b1bc938ca4106a33b1
Cr-Commit-Position: refs/heads/master@{#419313}
Patch Set 1 #Patch Set 2 : Update more Mac expectations #Patch Set 3 : Fix last expectation #Messages
Total messages: 17 (12 generated)
|