Closed
Bug 438325
Opened 16 years ago
Closed 16 years ago
Link with title and an image that has neither alt nor title doesn't get an accessible name.
Categories
(Core :: Disability Access APIs, defect)
Core
Disability Access APIs
Tracking
()
VERIFIED
FIXED
mozilla1.9.1a1
People
(Reporter: MarcoZ, Assigned: surkov)
References
()
Details
(Keywords: access)
Attachments
(2 files, 3 obsolete files)
218 bytes,
text/html
|
Details | |
7.85 KB,
patch
|
MarcoZ
:
review+
|
Details | Diff | Splinter Review |
On www.musicload.de, there are links that have a title attribute, and an embedded image. However, that embedded image has neither an alt nor a title attribute. In this case, we do not honour the link's title. The link accessible does not receive a name. I believe that, if no "on-screen" name is preseent, we should fallback to using the title attribute, if supplied along with the html:a tag. The priorities should be: 1. If a link has screen text, use it. 2. If it has an image, use the logic we have (alt and title of the html:img tag). 3. If the above are not present, and the html:a tag has a title, use that for an accessible name.
Flags: wanted1.9.0.x?
Reporter | ||
Comment 1•16 years ago
|
||
Reporter | ||
Comment 2•16 years ago
|
||
If the children don't return an accessible, try the title attribute of the html:a tag. Note that I don't check whether the call to content->getAttr actually returns true or false, since the result will be the same if there's no title: An empty string, so this test would be superflous, since there's no other course of action anyway.
Assignee: nobody → marco.zehe
Status: NEW → ASSIGNED
Attachment #324449 -
Flags: review?(aaronleventhal)
Reporter | ||
Comment 3•16 years ago
|
||
Attachment #324449 -
Attachment is obsolete: true
Attachment #324457 -
Flags: review?(surkov.alexander)
Attachment #324449 -
Flags: review?(aaronleventhal)
Assignee | ||
Comment 4•16 years ago
|
||
1) XUL label tries to get "value" attribute and then name from children. I think xul and html labels should have similar algorithm 2) Should we try to get the name like we do usually? because we ignore ARIA for example in this case, right?
Reporter | ||
Comment 5•16 years ago
|
||
(In reply to comment #4) > 1) XUL label tries to get "value" attribute and then name from children. I > think xul and html labels should have similar algorithm No, because the value for links contains the URL, we wouldn't want that as the name as the first try. > 2) Should we try to get the name like we do usually? because we ignore ARIA for > example in this case, right? The ARIA link test still passes, so I am not sure what you're getting at here.
Assignee | ||
Comment 6•16 years ago
|
||
(In reply to comment #5) > (In reply to comment #4) > > 1) XUL label tries to get "value" attribute and then name from children. I > > think xul and html labels should have similar algorithm > > No, because the value for links contains the URL, we wouldn't want that as the > name as the first try. So I guess we should fix it for xul label, right? > > 2) Should we try to get the name like we do usually? because we ignore ARIA for > > example in this case, right? > > The ARIA link test still passes, so I am not sure what you're getting at here. > Do we have tests you describe in the bug (replace title attribute on ARIA equivalent)?
Reporter | ||
Comment 7•16 years ago
|
||
(In reply to comment #6) > (In reply to comment #5) > > (In reply to comment #4) > > > 1) XUL label tries to get "value" attribute and then name from children. I > > > think xul and html labels should have similar algorithm > > No, because the value for links contains the URL, we wouldn't want that as the > > name as the first try. > So I guess we should fix it for xul label, right? I don't think so. With XUL:label elements, the value attribute usually contains the screen text/caption. Or, this text is enclosed within opening and closing XUL:label tags. XUL:label tags don't have a title attribute, so this bug does not apply to them. > > > 2) Should we try to get the name like we do usually? because we ignore ARIA for > > > example in this case, right? > > The ARIA link test still passes, so I am not sure what you're getting at here. > Do we have tests you describe in the bug (replace title attribute on ARIA > equivalent)? Do you mean a div whose role is "link" and which has a title?
Assignee | ||
Comment 8•16 years ago
|
||
(In reply to comment #7) > Do you mean a div whose role is "link" and which has a title? > I think of <span id="label">hello</span> <a id="LinkWithTitleAndProperImage" href="http://www.mozilla.org" aria-labelledby="label"><img src="moz.png" alt="MoFo home yet again"/></a>
Reporter | ||
Comment 9•16 years ago
|
||
(In reply to comment #8) > I think of > > <span id="label">hello</span> > <a id="LinkWithTitleAndProperImage" href="http://www.mozilla.org" > aria-labelledby="label"><img src="moz.png" alt="MoFo home yet again"/></a> Yes, in all cases the image's info, or an empty string, is used, aria-labelledby does currently not work on links. However I believe this should be dealt with in a separate bug, agreed?
Assignee | ||
Comment 10•16 years ago
|
||
(In reply to comment #9) > (In reply to comment #8) > > I think of > > > > <span id="label">hello</span> > > <a id="LinkWithTitleAndProperImage" href="http://www.mozilla.org" > > aria-labelledby="label"><img src="moz.png" alt="MoFo home yet again"/></a> > > Yes, in all cases the image's info, or an empty string, is used, > aria-labelledby does currently not work on links. However I believe this should > be dealt with in a separate bug, agreed? > Marco, does nsHyperTextAccessible::GetName() helps here?
Reporter | ||
Comment 11•16 years ago
|
||
(In reply to comment #10) > Marco, does nsHyperTextAccessible::GetName() helps here? No, it simply appends the text it has to anything that might be before it. How should it help?
Assignee | ||
Comment 13•16 years ago
|
||
(In reply to comment #11) > (In reply to comment #10) > > Marco, does nsHyperTextAccessible::GetName() helps here? > No, it simply appends the text it has to anything that might be before it. How > should it help? > Not sure I followed you. Actually I meant to call something like AppendFlatStringFromSubtree() GetHTMLName(label, false)
Reporter | ||
Comment 14•16 years ago
|
||
(In reply to comment #13) > Not sure I followed you. Actually I meant to call something like > > AppendFlatStringFromSubtree() > GetHTMLName(label, false) Where? Can you put this idea into a patch? I am not sure I understand what you're trying to do.
Assignee | ||
Comment 15•16 years ago
|
||
Assignee: marco.zehe → surkov.alexander
Attachment #324457 -
Attachment is obsolete: true
Attachment #325936 -
Flags: review?(marco.zehe)
Attachment #324457 -
Flags: review?(surkov.alexander)
Reporter | ||
Comment 16•16 years ago
|
||
Comment on attachment 325936 [details] [diff] [review] patch3 r=me with the two other testcases added, as discussed over IRC: 1. A link with onscreen text and title, where onscreen text is accessible name. 2. A link with an image. Image has alt, link has title. accessible name is text of image's alt attribute.
Attachment #325936 -
Flags: review?(marco.zehe) → review+
Assignee | ||
Comment 17•16 years ago
|
||
with Marco's comments
Attachment #325936 -
Attachment is obsolete: true
Reporter | ||
Comment 18•16 years ago
|
||
Comment on attachment 325953 [details] [diff] [review] patch4 Thanks!
Attachment #325953 -
Flags: review+
Assignee | ||
Comment 19•16 years ago
|
||
checked in on mozilla-central
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Reporter | ||
Comment 20•16 years ago
|
||
Verified fixed in Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1a1pre) Gecko/2008062603 Minefield/3.1a1pre. Now JAWS must just stop its extra processing and expose the name that we give it, but other screen readers are fine now.
Status: RESOLVED → VERIFIED
Reporter | ||
Updated•16 years ago
|
Target Milestone: --- → mozilla1.9.1a1
Assignee | ||
Updated•16 years ago
|
Flags: in-testsuite+
Updated•16 years ago
|
Flags: wanted1.9.0.x?
You need to log in
before you can comment on or make changes to this bug.
Description
•