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

Fix aria-labelledby on tables #886

Merged
merged 1 commit into from
May 19, 2017
Merged

Fix aria-labelledby on tables #886

merged 1 commit into from
May 19, 2017

Conversation

tysongach
Copy link
Contributor

@tysongach tysongach commented May 12, 2017

aria-labelledby accepts ids of other elements which act as an
accessible label(s). It's great for providing a label to tables, which
are large amounts of content; it helps people understand what the
table content actually is.

We're currently using aria-labelledby on tables in Administrate,
pointing to the id of the h1 on index pages. However, this breaks
when tables are shown as attribute data on show pages, because the id
of page-title does not exist, and it also is not the proper label for
the table (the attribute name is). You can see an example of this here:
https://administrate-prototype.herokuapp.com/admin/customers/9849

This PR allows an id of an element to be passed into the partial
which displays the collection table, so that it can used as the value
for the table's aria-labelledby attribute.

@tysongach tysongach added the views-and-styles how administrate looks and is interacted with label May 12, 2017
@BenMorganIO BenMorganIO self-requested a review May 12, 2017 18:41
`aria-labelledby` accepts `id`s of other elements which act as an
accessible label(s). It's great for providing a label to tables, which
are large amounts of content; it helps people understand what the table
content actually is.

We're currently using `aria-labelledby` on tables in Administrate,
pointing to the `id` of the `h1` on index pages. However, this breaks
when tables are shown as attribute data on show pages, because the `id`
of `page-title` does not exist, and it also is not the proper label for
the table (the attribute name is). You can see an example of this here:
https://administrate-prototype.herokuapp.com/admin/customers/9849

This PR allows an `id` of an element to be passed into the partial
which displays the collection table, so that it can used as the value
for the table's `aria-labelledby` attribute.
@nickcharlton nickcharlton merged commit 7fb4843 into master May 19, 2017
@nickcharlton nickcharlton deleted the tg-table-titles branch May 19, 2017 14:04
iarie pushed a commit to iarie/administrate that referenced this pull request Jun 17, 2017
`aria-labelledby` accepts `id`s of other elements which act as an
accessible label(s). It's great for providing a label to tables, which
are large amounts of content; it helps people understand what the table
content actually is.

We're currently using `aria-labelledby` on tables in Administrate,
pointing to the `id` of the `h1` on index pages. However, this breaks
when tables are shown as attribute data on show pages, because the `id`
of `page-title` does not exist, and it also is not the proper label for
the table (the attribute name is). You can see an example of this here:
https://administrate-prototype.herokuapp.com/admin/customers/9849

This PR allows an `id` of an element to be passed into the partial
which displays the collection table, so that it can used as the value
for the table's `aria-labelledby` attribute.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
views-and-styles how administrate looks and is interacted with
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants