Accessibility: Disabled Button with a tooltip renders <a> with empty text
Repro:
- go to demo > PopoverTooltip
- Edit the "Tooltip on Button Group": add
disabled="true"to the Edit button. - Inspect button's HTML
- Observe
<a>tag with no text. This is an accessibility issue: [A11Y_DOM_04] Links must have non-empty text content. More info http://sfdc.co/a11y_dom_04
<button class="slds-button slds-button--neutral drop-target drop-element-attached-top drop-element-attached-right drop-target-attached-bottom drop-target-attached-right" disabled="" data-reactid=".l.0.1">
<span data-reactid=".l.0.1.3">Edit</span>
<a href="javascript:void(0)" style="background-color:transparent;width:100%;height:100%;position:absolute;left:0px;top:0px;" data-reactid=".l.0.1.$MouseEventTarget"></a>
</button>
@donnieberg could you look into it?
@minevskiy let me know if https://github.com/salesforce-ux/design-system-react/commit/0f21bcea0cb04dc660d27b5e2f91808ebee66ed0 fixes it
I'm merging it into react013 branch in two min :)
@madpotato, @donnieberg , I've tested the fix and it works (even without the "tooltip trigger" suffix in assistiveText's span).
awesome! I don't think we need assistiveText there because: ariaHidden={true} is on the component
ariaHidden: true was there before, but Accessibility tests still failed.
~~I'll email Jesse about why ariaHidden is not sufficient.~~
Interesting, the ariaHidden attribute is not rendered. Is this the right attribute name?
I suspect it should be 'aria-hidden': true.
OK, I've confirmed that it should be 'aria-hidden': true, but I still get the Accessibility error, so I'll email Jesse.
Fixed