You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The axe.getRules() API method returns a rule's impact and ideally also the same info available in the Compliance Data & Impact section of each rule on a deque university rule page: Disabilities Affected, Requirements, Success Criteria, Section 508 Guidelines.
Actual
Only ruleId, description, help, helpUrl, and tagsare returned.
I can see WCAG Sucess Criteria and Requirements are there via the tags key, albeit in a truncated way that I'd need to parse, i.e.
{tags: ['cat.language','wcag2a','wcag311','ACT']}
instead of something like
{
requirements: [{id: 'wcag2a',description: 'WCAG 2.0 (A): MUST']
section508guidelines: [],wcagSuccessCritera: {id: 311,description: '3.1.1 Language of Page'}}
Motivation
I'm trying to find a way to do something very similar to https://github.com/dequelabs/axe-core/blob/develop/doc/rule-descriptions.md but make it a filterable/sortable table, so someone can view only WCAG AA rules or sort by impact (critical first). This would be part of internal documentation, helping my company and teammates to better prioritize which rules to address or to understand their impact when considering them while building new products. Although I could imagine other developers would also find a public resource like that quite useful.
I found what seemed like a similar issue but it was unclear to me what the outcome was. I'm confused about the suggestion that the rule impact is only calculated at run time / during test evaluations, because it's is available at https://github.com/dequelabs/axe-core/blob/develop/doc/rule-descriptions.md outside of any specific test and also on each deque university rule page.
I could potentially scrape the deque university website for that info, but if it's available in the axe-core API I'd much prefer that.
axe-core version
4.3.5
The text was updated successfully, but these errors were encountered:
ls-andrew-borstein
changed the title
Can getRules return "impact" and other details included in deque university pages?
Can getRules return "impact" and other details that are included in deque university pages?
Dec 3, 2021
It is unlikely we'll ever provide an API like this. Part of why we can make axe-core available for free is that it gets folks to our documentation pages. This is important to keep axe-core properly maintained. If there are changes you'd like to see for the documentation please let us know. We'll gladly consider those.
That said, it really isn't difficult to get that information out of axe-core. All the JSON files are included in the release, you could read out the directory. That's how the rule-descriptions.md file is created.
it really isn't difficult to get that information out of axe-core
I appreciate the suggestion — I'll see if I can retrieve the info I need that way. It looks like the any attribute connects a rule to its associated check, which does contain the impact info.
Part of why we can make axe-core available for free is that it gets folks to our documentation pages
I totally get that. FWIW you've got at least one vote in favor of improving the documentation such that the rules are filterable and sortable. And if that's something axe would be interested in, I'd be happy to make a separate issue to discuss how it could be implemented.
Product:
axe-core
Expectation
The
axe.getRules()
API method returns a rule's impact and ideally also the same info available in theCompliance Data & Impact
section of each rule on a deque university rule page: Disabilities Affected, Requirements, Success Criteria, Section 508 Guidelines.Actual
Only
ruleId
,description
,help
,helpUrl
, andtags
are returned.I can see WCAG Sucess Criteria and Requirements are there via the
tags
key, albeit in a truncated way that I'd need to parse, i.e.instead of something like
Motivation
I'm trying to find a way to do something very similar to https://github.com/dequelabs/axe-core/blob/develop/doc/rule-descriptions.md but make it a filterable/sortable table, so someone can view only WCAG AA rules or sort by impact (critical first). This would be part of internal documentation, helping my company and teammates to better prioritize which rules to address or to understand their impact when considering them while building new products. Although I could imagine other developers would also find a public resource like that quite useful.
Here's a live demo of what I'm attempting (with a static, non-interactive table at the moment): https://codesandbox.io/s/axe-core-get-rules-qpvmh?file=/src/App.js
I found what seemed like a similar issue but it was unclear to me what the outcome was. I'm confused about the suggestion that the rule impact is only calculated at run time / during test evaluations, because it's is available at https://github.com/dequelabs/axe-core/blob/develop/doc/rule-descriptions.md outside of any specific test and also on each deque university rule page.
I could potentially scrape the deque university website for that info, but if it's available in the axe-core API I'd much prefer that.
axe-core version
4.3.5
The text was updated successfully, but these errors were encountered: