Unless I'm doing things wrong, ARIA attributes cannot be bound to a state. This hinders implementing proper accessibility.
<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]).
Chrome 62.0.3202.29 for macOS.
AMP version 1506043780363
/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.
Most helpful comment
Thanks for reporting this. The fix has been merged, but it'll take a couple weeks for validator changes to rollout.