Amphtml: Can't bind aria attributes

Created on 24 Sep 2017  路  2Comments  路  Source: ampproject/amphtml

What's the issue?

Unless I'm doing things wrong, ARIA attributes cannot be bound to a state. This hinders implementing proper accessibility.

How do we reproduce the issue?

<amp-state>
  <script type='application/json'>
    {
      "navOpen": false
    }
  </script>
</amp-state>
<button [aria-expanded]='(navOpen ? "true" : "false")' on='tap:AMP.setState({navOpen: !navOpen})'>Menu</button>

The state gets updated, and so do other attributes I've bound in my page (mostly just [class]).

What browsers are affected?

Chrome 62.0.3202.29 for macOS.

Which AMP version is affected?

AMP version 1506043780363

Soon Accessibility Bug

Most helpful comment

Thanks for reporting this. The fix has been merged, but it'll take a couple weeks for validator changes to rollout.

All 2 comments

/to @choumx Hopefully low-effort, will high-impact for a11y

Thanks for reporting this. The fix has been merged, but it'll take a couple weeks for validator changes to rollout.

Was this page helpful?
0 / 5 - 0 ratings