Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • A administrate
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 96
    • Issues 96
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 32
    • Merge requests 32
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • thoughtbot, inc.
  • administrate
  • Merge requests
  • !886

Fix `aria-labelledby` on tables

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Administrator requested to merge tg-table-titles into master May 12, 2017
  • Overview 1
  • Commits 1
  • Pipelines 0
  • Changes 4

Created by: tysongach

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.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: tg-table-titles