Enhancement to rule ‘Mouse events should have corresponding keyboard events’

It would be great if Sonar could support Angular’s (keydown.enter) attribute as well and not just (keydown). A lot of people use keydown.enter alongside the click attribute but it’s flagged as being noncompliant with this rule. I think that’s a false positive because it still serves the purpose of accessibility. The .enter should be taken into account here. It’s simpler, cleaner, and folks don’t need to check with if statements what the key is.

Hello @abdul.khan,

Welcome to the comunity and thanks for your suggestion.
I’ve took a look at the documentation and think that we can include other event additions besides enter. That’s why I created this ticket https://jira.sonarsource.com/browse/SONARHTML-132

Best,
Nils

1 Like

Hi Nils,

Thank you for getting back to me. Yes, including other events will certainly be thorough. I’ll keep an eye on the ticket progress. Thank you!

Best,
Abdul