Disabled elements show focus style on click
|Reported by:||arschmitz||Owned by:|
If you click on a disabled element that has a tabindex for example a disabled selectmenu which has tabindex=-1 on the button the focus outline still shows in chrome, safari, and firefox. Old IE and Opera both do not show focus style on click.
I think the fix is to add pointer-events:none to ui-state-disabled. This is supported and fixes the issue in all effected browsers.
The only question is if there is a case we still want to get events on a disabled element? If there is we will need to add it to each widgets disabled rule that would need it. Currently this would be... selectmenu, spinner, accordion, tabs, slider, datepicker, and menu I think.
If pointer-events does not work here we will have to consider removing the tabindex all together for disabled elements ( and likely all child elements which we have applied it to )
Current datepicker can still be tabbed through when inline and disabled but since we use anchors without a tabindex clicks don't show any style. In new calendar widget we add tabindex=-1 this causes the anchors to show focus style when clicked and the calendar is disabled. ( current version is missing application of ui-state-disabled and also is using .on instead of _on for hover effects so these styles need to be fixed too but this will not fix focus style on click of days ) However pointer-events: none; will fix this for child elements as well.