Added support for a custom message on output#62
Open
GCHQDeveloper911 wants to merge 1 commit intocomponent-driven:masterfrom
Open
Added support for a custom message on output#62GCHQDeveloper911 wants to merge 1 commit intocomponent-driven:masterfrom
GCHQDeveloper911 wants to merge 1 commit intocomponent-driven:masterfrom
Conversation
sapegin
reviewed
Oct 26, 2020
Member
There was a problem hiding this comment.
Thanks for the pull request!
- I'm thinking about a new API for the next major release, and probably we'll need to replace all positional arguments of checkA11y with an object because we already have way too many and they are all optional.
- The name of the parameter. Maybe
nameorlabelwould be more clear?
I'll keep this pull request as a reference, and either include in the new version or ask you to rebase it on top of it.
Open
Member
|
I drafted my ideas on the new API: #75. I hope this covers your use case — let me know what you think. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added an optional message that can be passed with the call to checka11y after the skipFailures bool. This message will be set to either the message if supplied, or if not, the context if supplied, or a blank string if not. This is then passed to the violations callback, so the user has the option to do something with it when reporting violations, to allow for friendlier messaging, especially to help distinguish one call to checka11y from another.