• Aaron Leventhal's avatar
    Update a11y mapping of <menu> · 14e1e7da
    Aaron Leventhal authored
    The <menu> tag is no longer supported as an interactive feature, but
    is still supported as a semantic tag. The HTML spec still includes it
    as a container for <li> children, but has removed <menuitem>.
    
    Another option would be to try and be "clever" and look for
    role=menuitem children, changing the mapping to menu. However, given
    the state of the standard and varying browser support, it seems better
    to not add extra complexity and also to not encourage usage.
    
    Decisions:
    - Support simple mapping to the list role, because if it's just used
    semantically, it will be confusing for users who reach te menu and
    it does not act like one.
    - Remove behavior where child buttons/radios/checkboxes are mapped
    to menuitemfoo roles when inside a menu. There is nothing spec'd in
    HTML-AAM or CORE-AAM for either of these conditions, and it looks like
    more strange menu code that was inherited from WebKit.
    
    This CL will make it easier to support an upcoming CL that cleans
    up radio button code.
    
    Bug: None
    Change-Id: I49e95b5e526e742102b0bb6ad92b17f7a4ba0175
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2543685Reviewed-by: default avatarKevin Babbitt <kbabbitt@microsoft.com>
    Commit-Queue: Aaron Leventhal <aleventhal@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#828978}
    14e1e7da
element-role-mapping-focusable-expected.txt 2.49 KB