daisy / ace

Ace by DAISY, an Accessibility Checker for EPUB
MIT License
75 stars 22 forks source link

Inconsistency between languages #346

Closed thiagoeec closed 2 years ago

thiagoeec commented 3 years ago

Some axe messages are inconsistent between English and other languages. I don't know it this is on axe side or Ace's. Example:

English version:

Element is in tab order and does not have accessible text
Element does not have text that is visible to screen readers
aria-label attribute does not exist or is empty
aria-labelledby attribute does not exist, references elements that do not exist or references elements that are empty
Element has no title attribute
Ensures links have discernible text
Links must have discernible text

Portuguese version:

Corrija todos os itens a seguir: O elemento está na ordem de tabulação e não tem nome acessível
Corrija qualquer um dos itens a seguir: O elemento não tem texto que seja visível aos leitores de tela O atributo 'aria-label' não existe ou está vazio O atributo 'aria-labelledby' não existe, referencia elementos que não existem ou são vazios O elemento não tem um atributo 'title' ou ele está vazio
Certifique-se de que links tenham um texto discernível
Links devem ter um texto discernível

French version:

Corriger tous les éléments suivants : L’élément est dans l’ordre de tabulation et n’a pas d’intitulé accessible
Corriger l’un des éléments suivants : L’élément n’a aucun contenu textuel visible par les lecteurs d’écran L’attribut aria-label n’existe pas ou est vide L’attribut aria-labelledby n’existe pas, fait référence à des éléments qui n’existent pas ou à des éléments vides ou non visibles L’élément n’a pas d’attribut title ou l’attribut title est vide.
Vérifier que les liens ont un texte perceptible
Les liens doivent avoir un texte perceptible

If I recollect correctly, the English version has some regex to fix this, but the same was not applied to other languages, leaving them poorly formatted (sentences are linked together, without periods).

thiagoeec commented 3 years ago

Also, while in the subject of localized strings, the Localization Wiki page should be updated to include new languages at 'Choosing a Language at Runtime' section.

danielweck commented 3 years ago

I updated the wiki, thank you

danielweck commented 3 years ago

These strings from from Deque Axe, not DAISY Ace.

DAISY Ace removes occurences of Fix any of the following: and Fix all of the following: in an Axe JSON field violations[i].nodes[j].failureSummary, but obviously this is a hack that doesn't scale to the other languages supported by Axe.

danielweck commented 3 years ago

Here is Axe's code:

FR:

https://github.com/dequelabs/axe-core/blob/f62f0cf18f7b69b247b0b6362cf1ae71ffbf3a1b/locales/fr.json#L777-L783

PT_BR:

https://github.com/dequelabs/axe-core/blob/f62f0cf18f7b69b247b0b6362cf1ae71ffbf3a1b/locales/pt_BR.json#L817-L823

ES:

https://github.com/dequelabs/axe-core/blob/f62f0cf18f7b69b247b0b6362cf1ae71ffbf3a1b/locales/es.json#L758-L764

etc.

danielweck commented 2 years ago

Closing this issue as not fixable in Ace (see Axe comments above)