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

fixes #273 (DAISY KnowledgeBase ARIA entry for landmark-is-unique Axe check) #279

Closed
wants to merge 1 commit into from

Conversation

danielweck
Copy link
Member

@danielweck danielweck commented Aug 29, 2019

Fixes #273

@danielweck
Copy link
Member Author

danielweck commented Aug 29, 2019

I wonder how many other Axe checks/rules need KnowledgeBase mapping?
See:
https://github.com/dequelabs/axe-core/tree/master/lib/checks
https://github.com/dequelabs/axe-core/tree/master/lib/rules

const kbMap = {
'baseUrl': 'http://kb.daisy.org/publishing/',
'map': {
'accesskeys': {url: 'docs/html/accesskeys.html', title: localize("kb.accesskeys")},
'area-alt': {url: 'docs/html/maps.html', title: localize("kb.area-alt")},
'aria-allowed-attr': {url: 'docs/script/aria.html', title: localize("kb.aria-allowed-attr")},
'aria-hidden-body': {url: 'docs/script/aria.html', title: localize("kb.aria-hidden-body")},
'aria-required-attr': {url: 'docs/script/aria.html', title: localize("kb.aria-required-attr")},
'aria-required-children': {url: 'docs/script/aria.html', title: localize("kb.aria-required-children")},
'aria-required-parent': {url: 'docs/script/aria.html', title: localize("kb.aria-required-parent")},
'aria-roles': {url: 'docs/script/aria.html', title: localize("kb.aria-roles")},
'aria-valid-attr-value': {url: 'docs/script/aria.html', title: localize("kb.aria-valid-attr-value")},
'aria-valid-attr': {url: 'docs/script/aria.html', title: localize("kb.aria-valid-attr")},
'button-name': {url: 'docs/html/forms.html', title: localize("kb.button-name")},
'checkboxgroup': {url: 'docs/html/forms.html', title: localize("kb.checkboxgroup")},
'color-contrast': {url: 'docs/css/color.html', title: localize("kb.color-contrast")},
'definition-list': {url: 'docs/html/lists.html', title: localize("kb.definition-list")},
'dlitem': {url: 'docs/html/lists.html', title: localize("kb.dlitem")},
'document-title': {url: 'docs/html/title.html', title: localize("kb.document-title")},
'duplicate-id': {url: 'docs/html/ids.html', title: localize("kb.duplicate-id")},
'empty-heading': {url: 'docs/html/headings.html', title: localize("kb.empty-heading")},
'epub-type-has-matching-role': {url: 'docs/html/roles.html', title: localize("kb.epub-type-has-matching-role")},
'frame-title-unique': {url: 'docs/html/iframes.html', title: localize("kb.frame-title-unique")},
'frame-title': {url: 'docs/html/iframes.html', title: localize("kb.frame-title")},
'heading-order': {url: 'docs/html/headings.html', title: localize("kb.heading-order")},
'href-no-hash': {url: 'docs/html/links.html', title: localize("kb.href-no-hash")},
'html-has-lang': {url: 'docs/html/lang.html', title: localize("kb.html-has-lang")},
'html-lang-valid': {url: 'docs/html/lang.html', title: localize("kb.html-lang-valid")},
'image-alt': {url: 'docs/html/images.html', title: localize("kb.image-alt")},
'image-redundant-alt': {url: 'docs/html/images.html', title: localize("kb.image-redundant-alt")},
'input-image-alt': {url: 'docs/html/images.html', title: localize("kb.input-image-alt")},
'label-title-only': {url: 'docs/html/forms.html', title: localize("kb.label-title-only")},
'label': {url: 'docs/html/forms.html', title: localize("kb.label")},
'layout-table': {url: 'docs/html/tables.html', title: localize("kb.layout-table")},
'link-in-text-block': {url: 'docs/html/links.html', title: localize("kb.link-in-text-block")},
'link-name': {url: 'docs/html/links.html', title: localize("kb.link-name")},
'list': {url: 'docs/html/lists.html', title: localize("kb.list")},
'listitem': {url: 'docs/html/lists.html', title: localize("kb.listitem")},
'meta-refresh': {url: 'docs/html/meta.html', title: localize("kb.meta-refresh")},
'meta-viewport-large': {url: 'docs/html/meta.html', title: localize("kb.meta-viewport-large")},
'meta-viewport': {url: 'docs/html/meta.html', title: localize("kb.meta-viewport")},
'object-alt': {url: 'docs/html/object.html', title: localize("kb.object-alt")},
'p-as-heading': {url: 'docs/html/headings.html', title: localize("kb.p-as-heading")},
'pagebreak-label': {url: 'docs/navigation/pagelist.html', title: localize("kb.pagebreak-label")},
'radiogroup': {url: 'docs/html/forms.html', title: localize("kb.radiogroup")},
'scope-attr-valid': {url: 'docs/html/tables.html', title: localize("kb.scope-attr-valid")},
'server-side-image-map': {url: 'docs/html/maps.html', title: localize("kb.server-side-image-map")},
'table-duplicate-name': {url: 'docs/html/tables.html', title: localize("kb.table-duplicate-name")},
'table-fake-caption': {url: 'docs/html/tables.html', title: localize("kb.table-fake-caption")},
'td-has-header': {url: 'docs/html/tables.html', title: localize("kb.td-has-header")},
'td-headers-attr': {url: 'docs/html/tables.html', title: localize("kb.td-headers-attr")},
'th-has-data-cells': {url: 'docs/html/tables.html', title: localize("kb.th-has-data-cells")},
'valid-lang': {url: 'docs/html/lang.html', title: localize("kb.valid-lang")},
'video-caption': {url: 'docs/html/video.html', title: localize("kb.video-caption")},
'video-description': {url: 'docs/html/video.html', title: localize("kb.video-description")},
}
};

@danielweck
Copy link
Member Author

Note that in this PR I am reusing title: localize("kb.aria-roles") instead of unnecessarily creating a new translation ... they all say "ARIA" anyway:

"aria-allowed-attr": "ARIA",
"aria-hidden-body": "ARIA",
"aria-required-attr": "ARIA",
"aria-required-children": "ARIA",
"aria-required-parent": "ARIA",
"aria-roles": "ARIA",
"aria-valid-attr": "ARIA",
"aria-valid-attr-value": "ARIA",

@danielweck danielweck changed the title fixes #273 (DAISY KnowledgeBase ARIA entry for landmark-is-unique Axe rule) fixes #273 (DAISY KnowledgeBase ARIA entry for landmark-is-unique Axe check) Aug 29, 2019
@danielweck
Copy link
Member Author

Hello @rdeltour do you have any thoughts about the second comment in this PR?

@rdeltour
Copy link
Member

rdeltour commented Oct 9, 2019

I wonder how many other Axe checks/rules need KnowledgeBase mapping?

As far as I remembers, the keys in this mapping are rule names. To create this map, I think we used Axe's API to return the list of rules that were enabled in the version we use.

@danielweck
Copy link
Member Author

PR superseded with #299

@danielweck danielweck closed this Nov 25, 2019
@danielweck danielweck deleted the fix/landmark-is-unique-KB branch November 25, 2019 12:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

unique aria-label / title for landmarks (Invalid Link to KB)
2 participants