Chromium Code Reviews| Index: content/browser/accessibility/browser_accessibility_win.cc |
| diff --git a/content/browser/accessibility/browser_accessibility_win.cc b/content/browser/accessibility/browser_accessibility_win.cc |
| index 752d1539ca43f4216c36025941d88ef5a081165d..810e2d7b95f0134b148f3705b0dae3bbf69b562a 100644 |
| --- a/content/browser/accessibility/browser_accessibility_win.cc |
| +++ b/content/browser/accessibility/browser_accessibility_win.cc |
| @@ -2986,8 +2986,6 @@ void BrowserAccessibilityWin::OnDataChanged() { |
| // TODO(nektar): Handle the possibility of having multiple aria-invalid |
| // attributes defined, e.g., "invalid:spelling,grammar". |
| switch (invalid_state) { |
| - case ui::AX_INVALID_STATE_NONE: |
|
dmazzoni
2015/01/27 18:59:17
This isn't related to the sort change
|
| - break; |
| case ui::AX_INVALID_STATE_FALSE: |
| ia2_attributes_.push_back(L"invalid:false"); |
| break; |
| @@ -3017,6 +3015,29 @@ void BrowserAccessibilityWin::OnDataChanged() { |
| } |
| } |
| + // Expose row or column header sort direction. |
| + int32 sort_direction; |
| + if ((ia_role_ == ROLE_SYSTEM_COLUMNHEADER || |
| + ia_role_ == ROLE_SYSTEM_ROWHEADER) && |
| + GetIntAttribute(ui::AX_ATTR_SORT_DIRECTION, &sort_direction)) { |
| + switch (sort_direction) { |
| + case ui::AX_SORT_DIRECTION_UNSORTED: |
| + ia2_attributes_.push_back(L"sort:none"); |
| + break; |
| + case ui::AX_SORT_DIRECTION_ASCENDING: |
| + ia2_attributes_.push_back(L"sort:ascending"); |
| + break; |
| + case ui::AX_SORT_DIRECTION_DESCENDING: |
| + ia2_attributes_.push_back(L"sort:descending"); |
| + break; |
| + case ui::AX_SORT_DIRECTION_OTHER: |
| + ia2_attributes_.push_back(L"sort:other"); |
| + break; |
| + default: |
| + NOTREACHED(); |
| + } |
| + } |
| + |
| // The calculation of the accessible name of an element has been |
| // standardized in the HTML to Platform Accessibility APIs Implementation |
| // Guide (http://www.w3.org/TR/html-aapi/). In order to return the |