-
Notifications
You must be signed in to change notification settings - Fork 205
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
fix(action-button): action-button with href can be perceived by screen reader #4927
base: main
Are you sure you want to change the base?
Conversation
Branch previewReview the following VRT differencesWhen a visual regression test fails (or has previously failed while working on this branch), its results can be found in the following URLs:
If the changes are expected, update the |
Lighthouse scores
What is this?Lighthouse scores comparing the documentation site built from the PR ("Branch") to that of the production documentation site ("Latest") and the build currently on Transfer Size
Request Count
|
Pull Request Test Coverage Report for Build 11863201408Details
💛 - Coveralls |
Tachometer resultsChromeaction-bar permalinkbasic-test
action-button permalinkbasic-test
action-group permalinkbasic-test
action-menu permalinktest-basic
test-directive permalink
test-lazy permalink
test-open-close-directive permalink
test-open-close permalink
alert-banner permalinkbasic-test
alert-dialog permalinkbasic-test
breadcrumbs permalinkbasic-test
button-group permalinkbasic-test
button permalinktest-basic
coachmark permalinkbasic-test
combobox permalinkbasic-test
light-dom-test permalink
contextual-help permalinkbasic-test
dialog permalinkbasic-test
infield-button permalinkbasic-test
menu permalinktest-basic
number-field permalinkbasic-test
overlay permalinkbasic-test
directive-test permalink
element-test permalink
lazy-test permalink
picker-button permalinkbasic-test
picker permalinkbasic-test
popover permalinktest-basic
search permalinktest-basic
slider permalinktest-basic
tags permalinkbasic-test
toast permalinktest-basic
tooltip permalinktest-basic
test-directive permalink
test-element permalink
test-lazy permalink
truncated permalinkbasic-test
Firefoxaction-bar permalinkbasic-test
action-button permalinkbasic-test
action-group permalinkbasic-test
action-menu permalinktest-basic
test-directive permalink
test-lazy permalink
test-open-close-directive permalink
test-open-close permalink
alert-banner permalinkbasic-test
alert-dialog permalinkbasic-test
breadcrumbs permalinkbasic-test
button-group permalinkbasic-test
button permalinktest-basic
coachmark permalinkbasic-test
combobox permalinkbasic-test
light-dom-test permalink
contextual-help permalinkbasic-test
dialog permalinkbasic-test
infield-button permalinkbasic-test
menu permalinktest-basic
number-field permalinkbasic-test
overlay permalinkbasic-test
directive-test permalink
element-test permalink
lazy-test permalink
picker-button permalinkbasic-test
picker permalinkbasic-test
popover permalinktest-basic
search permalinktest-basic
slider permalinktest-basic
tags permalinkbasic-test
toast permalinktest-basic
tooltip permalinktest-basic
test-directive permalink
test-element permalink
test-lazy permalink
truncated permalinkbasic-test
|
…r voiceover click)
…orks for voiceover click)
@@ -76,25 +85,17 @@ export class ButtonBase extends ObserveSlotText(LikeAnchor(Focusable), '', [ | |||
}); | |||
} | |||
|
|||
public override click(): void { |
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.
This event is only firing when with a programatic click()
--like in parent components or in the majority of our tests. It is not firing with a mouse click (or, by extension, a VoiceOver click (i.e. CTRL+Option+Space. I removed it and made sure this functionality was in handleClickCapture()
function which is called by the click
event listener in the constructor()
, which is fired by programatic and mouse clicks.
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.
Nearly there! Also I see an action-button with href is not in our docs site! Can you please add an example so that the users are aware of its usage
@nikkimk Can you please make sure the tests are passing and surface up a new hash so that the VRTs are clean! Thanks |
Description
<sp-button>
and<sp-action-button>
withhref
could not be activated by mouse-click or screenreader click.ButtonBase
to allow clicks when there is anhref
attribute set.<sp-button>
and<sp-action-button>
.<sp-action-button>
with anhref
attribute.Related issue(s)
How has this been tested?
<sp-button> mouse click
<sp-button> screenreader click
<sp-action-button> mouse click
<sp-action-button> screenreader click
Did it pass in Desktop?
Did it pass in Mobile?
Did it pass in iPad?
Screenshots (if appropriate)
Types of changes
Checklist
Best practices
This repository uses conventional commit syntax for each commit message; note that the GitHub UI does not use this by default so be cautious when accepting suggested changes. Avoid the "Update branch" button on the pull request and opt instead for rebasing your branch against
main
.