evaluatory icon indicating copy to clipboard operation
evaluatory copied to clipboard

Support axe-core localizations

Open Gitsko opened this issue 2 years ago • 1 comments
trafficstars

Can I use the localization of axe core ? I have unfortunately not managed to do it in config :(

https://github.com/dequelabs/axe-core#localization

Gitsko avatar Aug 01 '23 19:08 Gitsko

Thanks for the report. Indeed, it is currently not possible to provide a custom locale. One reason is that the locale can only be provided to configure and not to run. This behavior can be fixed here. Another problem is that the default axe.min.js only contains the English locale.

First, the axe-core module configuration has to be split into configureOptions and runOptions, so we can support both parameters independently. This will be probably a breaking change (which would be okay).

With the above change, it would be possible to provide a custom localization, but only when all translations are provided by the user via the config. It would be much more user-friendly to support built-in translation files. We can try to access the built-in axe-core/locales files the same way we access the axe.min.js file.

Unfortunately, I don't have the capacity to work on this task anytime soon. Pull requests are highly welcome.

darekkay avatar Aug 06 '23 20:08 darekkay