New issue
Advanced search Search tips

Issue 675994 link

Starred by 4 users

Issue metadata

Status: Verified
Owner:
Closed: Feb 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , Chrome , Mac
Pri: 2
Type: Bug
Team-Accessibility



Sign in to add a comment

It's inefficient for Blink to check for rare ARIA attributes

Project Member Reported by dmazz...@chromium.org, Dec 20 2016

Issue description

The public interface to Blink accessibility currently has over 100 functions used to retrieve accessibility attributes from each object in the accessibility tree.

This is an inefficient way to retrieve this information, because *most* attributes are empty / not applicable to most objects.

In Chrome, we serialize the full state of every accessibility object and send the data to the browser process. Since we know we often want *all* accessibility attributes but most of them are rare, it's quite wasteful to do it this way.

In particular, consider calling these functions in a row:

ariaActiveDescendant()
ariaControls()
ariaFlowTo()
placeholder()

Each one of these requires calling Element::getAttribute() with a rather obscure attribute.

Instead, we could iterate over the attributes of an element once, and dispatch based on that.




 
Project Member

Comment 1 by bugdroid1@chromium.org, Jan 23 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/22632c56f2fe702261795bb3cd3f76a717addf4a

commit 22632c56f2fe702261795bb3cd3f76a717addf4a
Author: dmazzoni <dmazzoni@chromium.org>
Date: Mon Jan 23 22:57:40 2017

Add sparse accessibility attribute interface to Blink

It's inefficient to have separate interfaces in blink::WebAXObject to
query for each possible attribute, especially when those attributes are
rare and obscure ARIA attributes. Calling getAttribute many times in a row
is wasteful since many Elements have a lot of attributes we don't care
about, and many ARIA attributes are quite rare.

This change introduces a new WebAXObject interface for returning sparse
attributes. Call it once and pass a callback function. The implementation
iterates over all of the attributes of the element and calls the callback
with each accessibility attribute found.

This change re-implements the following 3 ARIA attributes as sparse
attributes; they're covered by existing tests:
  aria-activedescendant
  aria-controls
  aria-flowto

BUG= 675994 , 644766 

Review-Url: https://codereview.chromium.org/2589273002
Cr-Commit-Position: refs/heads/master@{#445527}

[modify] https://crrev.com/22632c56f2fe702261795bb3cd3f76a717addf4a/components/test_runner/web_ax_object_proxy.cc
[modify] https://crrev.com/22632c56f2fe702261795bb3cd3f76a717addf4a/content/renderer/accessibility/blink_ax_tree_source.cc
[modify] https://crrev.com/22632c56f2fe702261795bb3cd3f76a717addf4a/third_party/WebKit/Source/core/dom/QualifiedName.h
[modify] https://crrev.com/22632c56f2fe702261795bb3cd3f76a717addf4a/third_party/WebKit/Source/modules/accessibility/AXLayoutObject.cpp
[modify] https://crrev.com/22632c56f2fe702261795bb3cd3f76a717addf4a/third_party/WebKit/Source/modules/accessibility/AXLayoutObject.h
[modify] https://crrev.com/22632c56f2fe702261795bb3cd3f76a717addf4a/third_party/WebKit/Source/modules/accessibility/AXNodeObject.cpp
[modify] https://crrev.com/22632c56f2fe702261795bb3cd3f76a717addf4a/third_party/WebKit/Source/modules/accessibility/AXNodeObject.h
[modify] https://crrev.com/22632c56f2fe702261795bb3cd3f76a717addf4a/third_party/WebKit/Source/modules/accessibility/AXObject.h
[modify] https://crrev.com/22632c56f2fe702261795bb3cd3f76a717addf4a/third_party/WebKit/Source/modules/accessibility/InspectorAccessibilityAgent.cpp
[modify] https://crrev.com/22632c56f2fe702261795bb3cd3f76a717addf4a/third_party/WebKit/Source/web/AssertMatchingEnums.cpp
[modify] https://crrev.com/22632c56f2fe702261795bb3cd3f76a717addf4a/third_party/WebKit/Source/web/WebAXObject.cpp
[modify] https://crrev.com/22632c56f2fe702261795bb3cd3f76a717addf4a/third_party/WebKit/public/web/WebAXEnums.h
[modify] https://crrev.com/22632c56f2fe702261795bb3cd3f76a717addf4a/third_party/WebKit/public/web/WebAXObject.h

Project Member

Comment 2 by bugdroid1@chromium.org, Jan 31 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/8ca955425af665573f7ad3210643bcb3486c69b5

commit 8ca955425af665573f7ad3210643bcb3486c69b5
Author: dmazzoni <dmazzoni@chromium.org>
Date: Tue Jan 31 16:39:41 2017

Add 4 ARIA 1.1 attributes using new sparse attribute interface.

Adds support for 4 sparse ARIA 1.1 attributes:

  aria-details
  aria-errormessage
  aria-keyshortcuts
  aria-roledescription

Chrome support will be added in this follow-up change:
https://codereview.chromium.org/2587343004/

BUG= 675994 ,  644766 

Review-Url: https://codereview.chromium.org/2653063002
Cr-Commit-Position: refs/heads/master@{#447244}

[modify] https://crrev.com/8ca955425af665573f7ad3210643bcb3486c69b5/content/renderer/accessibility/blink_ax_tree_source.cc
[add] https://crrev.com/8ca955425af665573f7ad3210643bcb3486c69b5/third_party/WebKit/LayoutTests/inspector-protocol/accessibility/accessibility-aria-1.1-expected.txt
[add] https://crrev.com/8ca955425af665573f7ad3210643bcb3486c69b5/third_party/WebKit/LayoutTests/inspector-protocol/accessibility/accessibility-aria-1.1.html
[modify] https://crrev.com/8ca955425af665573f7ad3210643bcb3486c69b5/third_party/WebKit/Source/core/html/HTMLAttributeNames.in
[modify] https://crrev.com/8ca955425af665573f7ad3210643bcb3486c69b5/third_party/WebKit/Source/core/inspector/browser_protocol.json
[modify] https://crrev.com/8ca955425af665573f7ad3210643bcb3486c69b5/third_party/WebKit/Source/modules/accessibility/AXNodeObject.cpp
[modify] https://crrev.com/8ca955425af665573f7ad3210643bcb3486c69b5/third_party/WebKit/Source/modules/accessibility/AXObject.h
[modify] https://crrev.com/8ca955425af665573f7ad3210643bcb3486c69b5/third_party/WebKit/Source/modules/accessibility/InspectorAccessibilityAgent.cpp
[modify] https://crrev.com/8ca955425af665573f7ad3210643bcb3486c69b5/third_party/WebKit/Source/web/AssertMatchingEnums.cpp
[modify] https://crrev.com/8ca955425af665573f7ad3210643bcb3486c69b5/third_party/WebKit/public/web/WebAXEnums.h

Status: Fixed (was: Available)
Project Member

Comment 4 by bugdroid1@chromium.org, Feb 10 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/ca0b1e8456c010011b838b1f8d35027e45fc1c7d

commit ca0b1e8456c010011b838b1f8d35027e45fc1c7d
Author: dmazzoni <dmazzoni@chromium.org>
Date: Fri Feb 10 03:59:09 2017

Finish implementation and tests of 5 ARIA 1.1 attributes.

The changes that add support for these 5 new ARIA 1.1
attributes have landed:

  aria-details
  aria-errormessage
  aria-keyshortcuts
  aria-modal
  aria-roledescription

This change completes the implementation in Chrome, to the extent
that they are specified, and adds tests.

BUG= 675994 ,  644766 

Review-Url: https://codereview.chromium.org/2684543002
Cr-Commit-Position: refs/heads/master@{#449545}

[modify] https://crrev.com/ca0b1e8456c010011b838b1f8d35027e45fc1c7d/chrome/common/extensions/api/automation.idl
[modify] https://crrev.com/ca0b1e8456c010011b838b1f8d35027e45fc1c7d/content/browser/accessibility/accessibility_tree_formatter_blink.cc
[modify] https://crrev.com/ca0b1e8456c010011b838b1f8d35027e45fc1c7d/content/browser/accessibility/accessibility_tree_formatter_win.cc
[modify] https://crrev.com/ca0b1e8456c010011b838b1f8d35027e45fc1c7d/content/browser/accessibility/browser_accessibility_cocoa.mm
[modify] https://crrev.com/ca0b1e8456c010011b838b1f8d35027e45fc1c7d/content/browser/accessibility/browser_accessibility_win.cc
[modify] https://crrev.com/ca0b1e8456c010011b838b1f8d35027e45fc1c7d/content/browser/accessibility/browser_accessibility_win.h
[modify] https://crrev.com/ca0b1e8456c010011b838b1f8d35027e45fc1c7d/content/browser/accessibility/dump_accessibility_tree_browsertest.cc
[modify] https://crrev.com/ca0b1e8456c010011b838b1f8d35027e45fc1c7d/content/renderer/accessibility/blink_ax_tree_source.cc
[add] https://crrev.com/ca0b1e8456c010011b838b1f8d35027e45fc1c7d/content/test/data/accessibility/aria/aria-activedescendant-expected-blink.txt
[modify] https://crrev.com/ca0b1e8456c010011b838b1f8d35027e45fc1c7d/content/test/data/accessibility/aria/aria-activedescendant.html
[add] https://crrev.com/ca0b1e8456c010011b838b1f8d35027e45fc1c7d/content/test/data/accessibility/aria/aria-details-expected-blink.txt
[add] https://crrev.com/ca0b1e8456c010011b838b1f8d35027e45fc1c7d/content/test/data/accessibility/aria/aria-details-expected-win.txt
[add] https://crrev.com/ca0b1e8456c010011b838b1f8d35027e45fc1c7d/content/test/data/accessibility/aria/aria-details.html
[add] https://crrev.com/ca0b1e8456c010011b838b1f8d35027e45fc1c7d/content/test/data/accessibility/aria/aria-errormessage-expected-blink.txt
[add] https://crrev.com/ca0b1e8456c010011b838b1f8d35027e45fc1c7d/content/test/data/accessibility/aria/aria-errormessage-expected-win.txt
[add] https://crrev.com/ca0b1e8456c010011b838b1f8d35027e45fc1c7d/content/test/data/accessibility/aria/aria-errormessage.html
[add] https://crrev.com/ca0b1e8456c010011b838b1f8d35027e45fc1c7d/content/test/data/accessibility/aria/aria-keyshortcuts-expected-blink.txt
[add] https://crrev.com/ca0b1e8456c010011b838b1f8d35027e45fc1c7d/content/test/data/accessibility/aria/aria-keyshortcuts-expected-win.txt
[add] https://crrev.com/ca0b1e8456c010011b838b1f8d35027e45fc1c7d/content/test/data/accessibility/aria/aria-keyshortcuts.html
[add] https://crrev.com/ca0b1e8456c010011b838b1f8d35027e45fc1c7d/content/test/data/accessibility/aria/aria-modal-expected-blink.txt
[add] https://crrev.com/ca0b1e8456c010011b838b1f8d35027e45fc1c7d/content/test/data/accessibility/aria/aria-modal-expected-win.txt
[add] https://crrev.com/ca0b1e8456c010011b838b1f8d35027e45fc1c7d/content/test/data/accessibility/aria/aria-modal.html
[add] https://crrev.com/ca0b1e8456c010011b838b1f8d35027e45fc1c7d/content/test/data/accessibility/aria/aria-roledescription-expected-blink.txt
[add] https://crrev.com/ca0b1e8456c010011b838b1f8d35027e45fc1c7d/content/test/data/accessibility/aria/aria-roledescription-expected-mac.txt
[add] https://crrev.com/ca0b1e8456c010011b838b1f8d35027e45fc1c7d/content/test/data/accessibility/aria/aria-roledescription-expected-win.txt
[add] https://crrev.com/ca0b1e8456c010011b838b1f8d35027e45fc1c7d/content/test/data/accessibility/aria/aria-roledescription.html
[modify] https://crrev.com/ca0b1e8456c010011b838b1f8d35027e45fc1c7d/ui/accessibility/ax_enums.idl
[modify] https://crrev.com/ca0b1e8456c010011b838b1f8d35027e45fc1c7d/ui/accessibility/ax_node_data.cc
[modify] https://crrev.com/ca0b1e8456c010011b838b1f8d35027e45fc1c7d/ui/accessibility/ax_node_data.h
[modify] https://crrev.com/ca0b1e8456c010011b838b1f8d35027e45fc1c7d/ui/accessibility/ax_tree_combiner.cc

Status: Verified (was: Fixed)

Sign in to add a comment