You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I understand that the current a11y check for onclick in svelte is based on whether if the tag name and attribute values of the element to be checked match the allow list scheme defined in ax-object-query and aria-query.
Therefore, it seems that customElements with onclick in svelte component are warned, regardless of the appropriateness of the internal implementation.
The current workaround is to use <!-- svelte-ignore -->, but would the following improvements be planed in the future?
Add extensibility to a11y checking, such as allowing compiler options to add user's custom allow list.
Exclude customElements from the checking.
Other good ideas
We already have onwarn option, but I think it is required to extract tag name from the warning message, which would require an implementation that is a bit rough and less stable in the future.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I understand that the current a11y check for onclick in svelte is based on whether if the tag name and attribute values of the element to be checked match the allow list scheme defined in ax-object-query and aria-query.
Therefore, it seems that customElements with
onclick
in svelte component are warned, regardless of the appropriateness of the internal implementation.The current workaround is to use
<!-- svelte-ignore -->
, but would the following improvements be planed in the future?We already have
onwarn
option, but I think it is required to extract tag name from the warning message, which would require an implementation that is a bit rough and less stable in the future.https://github.com/sveltejs/vite-plugin-svelte/blob/main/docs/config.md#onwarn
search words: web component, customElements, a11y, accessibility
Beta Was this translation helpful? Give feedback.
All reactions