-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Format a11y error messages and remove skip #3721
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
Conversation
54c72ad to
666bc5f
Compare
|
🟢 No significant changes to |
666bc5f to
d8dfac0
Compare
| `${idParam}&contexts=Global%20Theming=Enabled%20-%20Light%20Mode`, | ||
| // Dark mode has lots of errors. It is still very WIP so ignore for now | ||
| // `${idParam}&contexts=Global%20Theming=Enabled%20-%20Dark%20Mode`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These links were not correctly resolving the New Design Language.
| return Promise.resolve({ | ||
| type: 'FAIL', | ||
| url, | ||
| errorCount: result.violations.length, | ||
| error: JSON.stringify(result.violations, null, 2), | ||
| }); | ||
| } catch (error) { | ||
| return Promise.resolve({ | ||
| type: 'ERROR', | ||
| url, | ||
| error: JSON.stringify(error, null, 2), | ||
| }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't need to resolve a promise inside p-map as it is already an async function which returns a promise. Removing the different types as the user only needs to know if there is an error caught or if the a11y tests failed.
scripts/accessibility-check.js
Outdated
| const isSkippedStory = | ||
| story.kind === 'Playground/Playground' || story.name === 'All Examples'; | ||
| const formatMessage = (id, violations) => { | ||
| const url = chalk.underline.blue(`http://localhost:6006/iframe.html?id=all-components-${id}`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added the URL for finding issues quickly, might be a bit too much information.
b63a0ee to
a4e74ac
Compare
fec5fd6 to
3e42326
Compare
WHY are these changes introduced?
Fixes #0000
WHAT is this pull request doing?
How to 🎩
🖥 Local development instructions
🗒 General tophatting guidelines
📄 Changelog guidelines
Copy-paste this code in
playground/Playground.tsx:🎩 checklist
README.mdwith documentation changes