fix(checks/no-focusable-disable): don't count non-disableable elements as disabled#3393
Merged
straker merged 49 commits intodequelabs:developfrom Feb 22, 2022
Merged
fix(checks/no-focusable-disable): don't count non-disableable elements as disabled#3393straker merged 49 commits intodequelabs:developfrom
straker merged 49 commits intodequelabs:developfrom
Conversation
Make `internal-link-present-evaluate` work with virtualNode rather than actualNode. Closes issue dequelabs#2466
This reverts commit 9f996bc.
…ractive" Closes issue dequelabs#2934
…dequelabs-develop-2
Dequelabs develop 2
work in progress
work in progress
…ractive" Closes issue dequelabs#2934
Now checks "disabled" attribute Closes issue dequelabs#3315
straker
previously requested changes
Feb 21, 2022
Contributor
straker
left a comment
There was a problem hiding this comment.
Thanks for taking on the pr. Just have 1 suggestion, but otherwise it looks good.
Co-authored-by: Steven Lambert <2433219+straker@users.noreply.github.com>
Contributor
Author
|
Right on. Done. |
straker
approved these changes
Feb 22, 2022
Contributor
|
reviewed for security |
Contributor
Author
|
Thanks! |
rafaelpaniago1
added a commit
to masganem/axe-core-mes-20252
that referenced
this pull request
Nov 7, 2025
Implementação da correção do bug onde focusDisabled() não verificava se o elemento suporta o atributo 'disabled' antes de usá-lo. Problema: - Links <a href disabled> eram tratados como não-focusáveis - Atributo 'disabled' não é válido em elementos <a> - Apenas elementos de formulário específicos suportam 'disabled' Solução aplicada: 1. Criar lista de elementos que suportam disabled: button, command, fieldset, keygen, optgroup, option, select, textarea, input 2. Criar função helper canBeDisabled(nodeName) 3. Verificar tipo de elemento antes de checar atributo disabled Arquivo modificado: lib/commons/dom/focus-disabled.js Comparação com solução oficial (PR dequelabs#3393): ✅ FUNCIONALMENTE IDÊNTICA - 100% similar Diferenças (apenas estilísticas): - Nomenclatura: canBeDisabled() vs isDisabledAttrAllowed() - Documentação: Minha solução tem JSDoc + comentários extras - Formatação: Oficial usa trailing commas Pontos positivos da minha solução: ✅ JSDoc completo na função helper ✅ Comentário com exemplo concreto (<a href disabled>) ✅ Explicação do porquê da mudança Ambas as soluções: ✅ Mesma lista de elementos (9 elementos) ✅ Mesma lógica de verificação ✅ Mesma referência à spec (MDN) ✅ Resolvem o problema completamente Análise completa em: ANALISE-ISSUE-3315.md Referências: - Issue: dequelabs#3315 - PR oficial: dequelabs#3393 - MDN: https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/disabled - Commit oficial: bb8b5ca
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.
focusDisabled() now checks the element name to see if "disabled" attribute is valid on that element.
Closes issue #3315