Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2542)

Unified Diff: chrome/browser/browser_accessibility_win.cc

Issue 3402025: Expose the level of headings to NVDA.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/browser_accessibility_win.cc
===================================================================
--- chrome/browser/browser_accessibility_win.cc (revision 60148)
+++ chrome/browser/browser_accessibility_win.cc (working copy)
@@ -46,6 +46,12 @@
location_ = src.location;
InitRoleAndState(src.role, src.state);
+ // Expose headings levels to NVDA with the "level" object attribute.
+ if (src.role == WebAccessibility::ROLE_HEADING && role_name_.size() == 2 &&
+ IsAsciiDigit(role_name_[1])) {
+ html_attributes_.push_back(std::make_pair(L"level", role_name_.substr(1)));
+ }
+
// If this object doesn't have a name but it does have a description,
// use the description as its name - because some screen readers only
// announce the name.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698