Bug 23583 - Populate role attribute for Documents
Summary: Populate role attribute for Documents
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Accessibility (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Windows XP
: P2 Normal
Assignee: Sankar Aditya Tanguturi
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-27 23:00 PST by Sankar Aditya Tanguturi
Modified: 2009-04-29 15:15 PDT (History)
5 users (show)

See Also:


Attachments
Patch to populate role attribute for document elements. (5.08 KB, patch)
2009-01-28 00:25 PST, Sankar Aditya Tanguturi
no flags Details | Formatted Diff | Diff
Patch to populate role attribute for document elements. (5.12 KB, patch)
2009-01-28 00:34 PST, Sankar Aditya Tanguturi
mrowe: review-
Details | Formatted Diff | Diff
Patch to populate role attribute for document elements. (3.87 KB, patch)
2009-02-01 15:11 PST, Sankar Aditya Tanguturi
adele: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sankar Aditya Tanguturi 2009-01-27 23:00:34 PST
When a page is loaded in safari and inspect32 tool is invoked, Accessibility role attribute for document is not properly populated. We need to add a new role i.e documentRole and need to set that role to all document objects.


~ Thanks
Sankar.
Comment 1 Sankar Aditya Tanguturi 2009-01-28 00:25:46 PST
Created attachment 27095 [details]
Patch to populate role attribute for document elements.

This is a very small patch. This patch just contains the changes to add a new accessibility role i.e. document for document objects and populate it correctly when focused.
Comment 2 Sankar Aditya Tanguturi 2009-01-28 00:34:12 PST
Created attachment 27096 [details]
Patch to populate role attribute for document elements.

This patch just creates a new accessibility role i.e. documentRole for document objects and populate that role appropriately when focused.
Comment 3 chris fleizach 2009-01-28 11:58:29 PST
is the document role in windows equivalent to a web area role in Mac?
Comment 4 Jonas Klink 2009-01-28 13:32:28 PST
Yes, this is also equivalent to ATK's role ATK_ROLE_DOCUMENT_FRAME.
Comment 5 chris fleizach 2009-01-28 13:44:32 PST
are you sure you need to add a DocumentRole then to the list of roles, since apparently DocumentRole is the same thing as WebAreaRole
Comment 6 Jonas Klink 2009-01-28 13:47:35 PST
As long as MSAA will return the correct role on Windows (ROLE_SYSTEM_DOCUMENT), either way works for me.
Comment 7 Sankar Aditya Tanguturi 2009-01-28 14:01:51 PST
This patch returns the appropriate MSAA role i.e. ROLE_SYSTEM_DOCUMENT on windows. I don't find anywhere in the code that returns this role for windows.

~ Thanks
Comment 8 Mark Rowe (bdash) 2009-01-30 04:36:33 PST
Comment on attachment 27096 [details]
Patch to populate role attribute for document elements.

Based on my reading of the code Chris is right and WebAreaRole already serves this purpose.  I think MSAARole simply needs updated to map WebAreaRole to ROLE_SYSTEM_DOCUMENT on Windows.
Comment 9 Sankar Aditya Tanguturi 2009-02-01 15:11:32 PST
Created attachment 27235 [details]
Patch to populate role attribute for document elements.

As mentioned in review comments, I have update the patch.

1. Just added changes to populate role attribute for documents objects correctly.
2. Added a new test case. This fix is specific for windows accessibility. So, moved the test case to LayoutTests/platform/win/accessiblity directory.

~ Thanks.
Comment 10 chris fleizach 2009-02-02 13:58:59 PST
looks ok to me
Comment 11 Eric Seidel (no email) 2009-04-29 15:15:05 PDT
I cleaned up the ChangeLogs some.  I also removed some extra spaces and HTML from the layout test.  I don't understand why the layout test needs to use an onload handler.  I woudl expect it to work inline.  But since I don't have a windows box to test on, I'm just going to leave it using the onload.

The test would really be better as a JS-style test (like those in fast/js) but it's fine for now. :)

I also made     virtual long role() const;
have "virtual" since we try to be explicit about what methods are virtual and what are not, even though the keyword is not strictly required for subclass implementations.

Committing to http://svn.webkit.org/repository/webkit/trunk ...
	M	LayoutTests/ChangeLog
	A	LayoutTests/platform/win/accessibility/document-role-expected.txt
	A	LayoutTests/platform/win/accessibility/document-role.html
	M	WebKit/win/AccessibleDocument.cpp
	M	WebKit/win/AccessibleDocument.h
	M	WebKit/win/ChangeLog
Committed r43018


Thank you for the patch Sankar.