Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[A11Y] amp-list, list role should be on the container not the element #5513

Closed
aghassemi opened this issue Oct 10, 2016 · 4 comments
Closed

Comments

@aghassemi
Copy link
Contributor

The role=list should be on the container_ which is the parent of role=listitem children. Currently the role is on the element itself and TalkBack is not announcing items as list items. Alternative approach is using aria-owns but that's not worth it.

Also we should fix the examples on https://ampbyexample.com/components/amp-list/ they are invalid HTML and there is no need for the wrapper UL and LI children.

They should just be

    <amp-list width=auto
        height=100
        layout=fixed-height
        src="https://ampbyexample.com/json/examples.json">
      <template type="amp-mustache"
          id="amp-template-id">
        <div>
          <a href={{url}}>{{title}}</a>
        </div>
      </template>
    </amp-list>

We should add some text to the example that ensures the author we are using proper aria attributes to make these a list.

If we really like to allow folks to use 'li' as children, then amp-list needs to become smarter and not create the container until it has a child and can inspect the child to see if it is a li or not and based on that either create a div or an ul

@aghassemi
Copy link
Contributor Author

/to @lannka

@ericlindley-g ericlindley-g added this to the Current milestone Oct 13, 2016
@lannka
Copy link
Contributor

lannka commented Oct 21, 2016

hi @kul3r4 do you want to take a look at the ABE issue?

@aghassemi
Copy link
Contributor Author

Closed by #5740

@lannka
Copy link
Contributor

lannka commented Oct 21, 2016

@aghassemi to track the ABE bug, you might want to open an issue here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

3 participants