Skip to content

ARIA

No due date 78% complete

Goal: Implement a minimal mandatory set of ARIA-compliant attributes.

Changes

Helpers

  • The relevant elements should have the aria-label attribute that should be i18n aware "Pages"
  • All the helpers should add a couple of key arguments to customize the nav aria-label: page_label: and page_i18n_key:
  • The relevant elements for the current page should have the a…

Goal: Implement a minimal mandatory set of ARIA-compliant attributes.

Changes

Helpers

  • The relevant elements should have the aria-label attribute that should be i18n aware "Pages"
  • All the helpers should add a couple of key arguments to customize the nav aria-label: page_label: and page_i18n_key:
  • The relevant elements for the current page should have the attribute aria-current="page"
  • The relevant elements should be preferably a or role="link" also for disabled element
  • Disable element should have the attribute aria-disabled="true"
  • The prev and next links should have "Prev" and "Next" i18n aware aria-label

Dictionaries

  • We need to add a `"page_label" entry in each language
  • The composite < Prev and Next > text has been reduced to < and > and the aria-label is the Prev Next, so the pagy.nav entry will have an extra prev_label and next_label now
  • We can use Google translate for the languages that we are not sure about and invite the original contributors to review our changes.

Workflow

  • We should create one issue per language and one issue per style based on the aria branch in advance
  • Any contributor could pick any issue, and contribute with a PR.
    • The user/collaborator that wants to get an issue assigned, should add a comment stating so, so we will avoid overlapping efforts
    • The PR title should include the (resolves #123) or (cleses #123)` referring the issue number, so it will get automatically linked to the issue.
    • Since Github automatically closes the issue when merged with the default branch only, and since it's not a good idea changing the default branch to aria we will have to close it manually (which sucks, thanks github)

The changes are likely to break the view tests of apps, since we will change the HTML, so I suggest to release in a mayor version to avoid unwanted surprises to users.

Loading