Closed
Bug 386551
Opened 18 years ago
Closed 17 years ago
expose ARIA description on document
Categories
(Core :: Disability Access APIs, defect)
Core
Disability Access APIs
Tracking
()
RESOLVED
FIXED
People
(Reporter: surkov, Assigned: vasiliy.potapenko)
References
Details
(Keywords: access)
Attachments
(1 file, 2 obsolete files)
(deleted),
patch
|
Details | Diff | Splinter Review |
(In reply to comment #6 bug 386282)
> If the <html> or <body> had aaa:describedby there could be a description for
> the element. See GetRoleContent().
>
> IMO the correct fix would change GetAccessibleRelated to check <html> or <body>
> for accessible relations. If it makes the code a lot more complicated to check
> both, then we could just check <body> in HTML and I will tell the ARIA
> standardization group what we did. In other markup languages we should check
> the top element.
>
<surkov> aaronlev, how are description on html and body related with document accessible?
<aaronlev> That's where ARIA attributes can apply to the document
<aaronlev> for example if you put
<aaronlev> <body role="wairole:application">
<aaronlev> it changes the role for the nsDocAccessible
<aaronlev> if you put <body role="wairole:application" aaa:describedby="myAppDescription"><div id="myAppDescription">Fill in the available dates and times for travel</div> blah blah blah </body>
<surkov> ah, ok
<aaronlev> Then the nsDocAccessible would have a description and describedby
<surkov> I'll file bug for this
Reporter | ||
Updated•18 years ago
|
Assignee: aaronleventhal → vasiliy.potapenko
Assignee | ||
Updated•18 years ago
|
Status: NEW → ASSIGNED
Reporter | ||
Comment 1•17 years ago
|
||
Probably the easiest way is to fix GetTextFromRelationID() to use GetRoleContent() and call GetTextFromRelationID on nsDocAccessible.
Assignee | ||
Comment 2•17 years ago
|
||
Surkov, what difference between aria-describedby and aaa:describedby in HTML?
Reporter | ||
Comment 3•17 years ago
|
||
(In reply to comment #2)
> Surkov, what difference between aria-describedby and aaa:describedby in HTML?
>
aria-describedby can be used in html where namespace can't be used, aaa:describedby in any XML language. Use GetAriaProperty().
Assignee | ||
Comment 4•17 years ago
|
||
Attachment #284394 -
Flags: review?(aaronleventhal)
Updated•17 years ago
|
Attachment #284394 -
Flags: review?(aaronleventhal) → review+
Assignee | ||
Updated•17 years ago
|
Attachment #284394 -
Flags: superreview?(neil)
Reporter | ||
Comment 5•17 years ago
|
||
nsIContent::GetDocument is deprecated, use GetCurrentDoc or GetOwnerDoc instead.
Also, here superreview is not required I think but if you like then it's up to you. When you'll get all reviws you want request approval for 1.9
Assignee | ||
Updated•17 years ago
|
Attachment #284394 -
Flags: superreview?(neil)
Assignee | ||
Comment 6•17 years ago
|
||
I have changed GetDocument() to GetOwnerDoc().
Attachment #284394 -
Attachment is obsolete: true
Assignee | ||
Updated•17 years ago
|
Attachment #284414 -
Flags: approval1.9?
Comment 7•17 years ago
|
||
Comment on attachment 284414 [details] [diff] [review]
patch2
> NS_IMETHODIMP
> nsDocAccessible::GetDescription(nsAString& aDescription)
> {
> aDescription.Truncate();
>+
>+ nsAutoString description;
>+ nsresult rv = GetTextFromRelationID(eAria_describedby, description);
>+
>+ if (NS_SUCCEEDED(rv) && !description.IsEmpty()) {
>+ aDescription = description;
>+ }
>+
> return NS_OK;
> }
I don't know how essential it is that you ignore the rv, especially since GetTextFromRelationID seems to be unsure when it ignores its rv, but you might consider an unconditional assignment i.e.
nsAutoString description;
GetTextFromRelationID(eAria_describedby, description);
aDescription = description;
return NS_OK;
Sucks to our string API; if only it didn't need to call CompressWhitespace then GetTextFromRelationID could take an nsAString& and you could simply
return GetTextFromRelationID(eAria_describedby, aDescription);
Updated•17 years ago
|
Attachment #284414 -
Flags: approval1.9? → approval1.9+
Reporter | ||
Comment 8•17 years ago
|
||
Vasiliy, before your patch will be checked in, please address Neil's comments.
Assignee | ||
Comment 9•17 years ago
|
||
Attachment #284414 -
Attachment is obsolete: true
Reporter | ||
Comment 10•17 years ago
|
||
checked in
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•