diff --git a/.prettierignore b/.prettierignore index 77bdd29cf38c..4eea07c2e766 100644 --- a/.prettierignore +++ b/.prettierignore @@ -4,6 +4,7 @@ packages/**/npm/**/* packages/**/config/*.js packages/svelte/messages/**/*.md packages/svelte/src/compiler/errors.js +packages/svelte/src/compiler/warnings.js packages/svelte/tests/**/*.svelte packages/svelte/tests/**/_expected* packages/svelte/tests/**/_actual* diff --git a/packages/svelte/messages/compile-warnings/a11y.md b/packages/svelte/messages/compile-warnings/a11y.md new file mode 100644 index 000000000000..0e2aaa92b047 --- /dev/null +++ b/packages/svelte/messages/compile-warnings/a11y.md @@ -0,0 +1,171 @@ +## a11y_aria_attributes + +<%name%> should not have aria-* attributes + +## a11y_unknown_aria_attribute + +Unknown aria attribute 'aria-%attribute%' + +## a11y_unknown_aria_attribute_suggestion + +Unknown aria attribute 'aria-%attribute%'. Did you mean '%suggestion%'? + +## a11y_hidden + +<%name%> element should not be hidden + +## a11y_incorrect_aria_attribute_type_boolean + +The value of '%attribute%' must be either 'true' or 'false' + +## a11y_incorrect_aria_attribute_type_integer + +The value of '%attribute%' must be an integer + +## a11y_incorrect_aria_attribute_type_id + +The value of '%attribute%' must be a string that represents a DOM element ID + +## a11y_incorrect_aria_attribute_type_idlist + +The value of '%attribute%' must be a space-separated list of strings that represent DOM element IDs + +## a11y_incorrect_aria_attribute_type_tristate + +The value of '%attribute%' must be exactly one of true, false, or mixed + +## a11y_incorrect_aria_attribute_type_token + +The value of '%attribute%' must be exactly one of %values% + +## a11y_incorrect_aria_attribute_type_tokenlist + +The value of '%attribute%' must be a space-separated list of one or more of %values% + +## a11y_incorrect_aria_attribute_type + +The value of '%attribute%' must be of type %type% + +## a11y_aria_activedescendant_has_tabindex + +Elements with attribute aria-activedescendant should have tabindex value + +## a11y_misplaced_role + +<%name%> should not have role attribute + +## a11y_no_abstract_role + +Abstract role '%role%' is forbidden + +## a11y_unknown_role + +Unknown role '%role%' + +## a11y_unknown_role_suggestion + +Unknown role '%role%'. Did you mean '%suggestion%'? + +## a11y_no_redundant_roles + +Redundant role '%role%' + +## a11y_role_has_required_aria_props + +Elements with the ARIA role "%role%" must have the following attributes defined: %props% + +## a11y_interactive_supports_focus + +Elements with the '%role%' interactive role must have a tabindex value. + +## a11y_no_interactive_element_to_noninteractive_role + +<%element%> cannot have role '%role%' + +## a11y_no_noninteractive_element_to_interactive_role + +Non-interactive element <%element%> cannot have interactive role '%role%' + +## a11y_accesskey + +Avoid using accesskey + +## a11y_autofocus + +Avoid using autofocus + +## a11y_misplaced_scope + +The scope attribute should only be used with elements + +## a11y_positive_tabindex + +Avoid tabindex values above zero + +## a11y_click_events_have_key_events + +Visible, non-interactive elements with a click event must be accompanied by a keyboard event handler. Consider whether an interactive element such as