@accesslint/core 0.8.6 → 0.8.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1819,10 +1819,10 @@ function ra(e, a, t) {
1819
1819
  const sa = {
1820
1820
  id: "adaptable/list-children",
1821
1821
  selector: "ul, ol",
1822
- check: { type: "child-invalid", allowedChildren: ["li", "script", "template"], allowedChildRoles: ["listitem"] },
1822
+ check: { type: "child-invalid", allowedChildren: ["li", "script", "template", "style"], allowedChildRoles: ["listitem"] },
1823
1823
  impact: "serious",
1824
1824
  message: "List contains non-<li> child <{{tag}}>.",
1825
- description: "<ul> and <ol> must only contain <li>, <script>, or <template> as direct children.",
1825
+ description: "<ul> and <ol> must only contain <li>, <script>, <template>, or <style> as direct children.",
1826
1826
  wcag: ["1.3.1"],
1827
1827
  level: "A",
1828
1828
  fixability: "contextual",
@@ -1879,10 +1879,10 @@ const sa = {
1879
1879
  }, ua = {
1880
1880
  id: "adaptable/definition-list",
1881
1881
  selector: "dl",
1882
- check: { type: "child-invalid", allowedChildren: ["dt", "dd", "div", "script", "template"] },
1882
+ check: { type: "child-invalid", allowedChildren: ["dt", "dd", "div", "script", "template", "style"] },
1883
1883
  impact: "serious",
1884
1884
  message: "<dl> contains invalid child <{{tag}}>.",
1885
- description: "<dl> elements must only contain <dt>, <dd>, <div>, <script>, or <template>.",
1885
+ description: "<dl> elements must only contain <dt>, <dd>, <div>, <script>, <template>, or <style>.",
1886
1886
  wcag: ["1.3.1"],
1887
1887
  level: "A",
1888
1888
  fixability: "contextual",
@@ -5341,10 +5341,10 @@ const Jn = {
5341
5341
  "landmarks/complementary-is-top-level": { description: "Aside (complementary) landmark should be top-level or directly inside main.", guidance: "The complementary landmark (aside) should be top-level or a direct child of main. Nesting aside deep within other landmarks reduces its discoverability for screen reader users navigating by landmarks.", messages: { "Complementary landmark should be top-level.": "Complementary landmark should be top-level." } },
5342
5342
  "landmarks/landmark-unique": { description: "Landmarks should have unique labels when there are multiple of the same type.", guidance: "When a page has multiple landmarks of the same type (e.g., multiple nav elements), each should have a unique accessible name via aria-label or aria-labelledby. This helps screen reader users distinguish between them (e.g., 'Main navigation' vs 'Footer navigation').", messages: { 'Multiple {0} landmarks have the same label "{1}".': 'Multiple {0} landmarks have the same label "{1}".', "Multiple {0} landmarks have no label. Add unique aria-label attributes.": "Multiple {0} landmarks have no label. Add unique aria-label attributes." } },
5343
5343
  "landmarks/region": { description: "All page content should be contained within landmarks.", guidance: "Screen reader users navigate pages by landmarks. Content outside landmarks is harder to find and understand. Wrap all visible content in appropriate landmarks: <header>, <nav>, <main>, <aside>, <footer>, or <section> with a label. Skip links may exist outside landmarks.", messages: { "Content is not contained within a landmark region.": "Content is not contained within a landmark region." } },
5344
- "adaptable/list-children": { description: "<ul> and <ol> must only contain <li>, <script>, or <template> as direct children.", guidance: "Screen readers announce list structure ('list with 5 items') based on proper markup. Placing non-<li> elements directly inside <ul> or <ol> breaks this structure. Wrap content in <li> elements, or if you need wrapper divs for styling, apply styles to <li> elements directly and remove the wrapper (e.g., change <ul><div>item</div></ul> to <ul><li>item</li></ul>).", messages: { "List contains non-<li> child <{0}>.": "List contains non-<li> child <{0}>." } },
5344
+ "adaptable/list-children": { description: "<ul> and <ol> must only contain <li>, <script>, <template>, or <style> as direct children.", guidance: "Screen readers announce list structure ('list with 5 items') based on proper markup. Placing non-<li> elements directly inside <ul> or <ol> breaks this structure. Wrap content in <li> elements, or if you need wrapper divs for styling, apply styles to <li> elements directly and remove the wrapper (e.g., change <ul><div>item</div></ul> to <ul><li>item</li></ul>).", messages: { "List contains non-<li> child <{0}>.": "List contains non-<li> child <{0}>." } },
5345
5345
  "adaptable/listitem-parent": { description: "<li> elements must be contained in a <ul>, <ol>, or <menu>.", guidance: "List items (<li>) only have semantic meaning inside a list container (<ul>, <ol>, or <menu>). Without a list parent, screen readers will not announce 'list with N items' or allow users to skip between items using list navigation shortcuts. Wrap <li> elements in the appropriate list container — <ul> for unordered lists, <ol> for ordered/numbered lists.", messages: { "<li> is not contained in a <ul>, <ol>, or <menu>.": "<li> is not contained in a <ul>, <ol>, or <menu>." } },
5346
5346
  "adaptable/dl-children": { description: "<dt> and <dd> elements must be contained in a <dl>.", guidance: "Definition terms (<dt>) and definitions (<dd>) only have semantic meaning inside a definition list (<dl>). Outside of <dl>, they're treated as generic text. Wrap related <dt> and <dd> pairs in a <dl> element to convey the term/definition relationship to assistive technologies.", messages: { "<{0}> is not contained in a <dl>.": "<{0}> is not contained in a <dl>." } },
5347
- "adaptable/definition-list": { description: "<dl> elements must only contain <dt>, <dd>, <div>, <script>, or <template>.", guidance: "Definition lists have strict content requirements. Only <dt> (terms), <dd> (definitions), and <div> (for grouping dt/dd pairs) are valid children. Other elements break the list structure for screen readers. Move invalid elements outside the <dl>, or if they represent a term change to <dt>, if a definition change to <dd>. Styling wrappers should be replaced with <div> elements containing <dt>/<dd> pairs.", messages: { "<dl> contains invalid child <{0}>.": "<dl> contains invalid child <{0}>." } },
5347
+ "adaptable/definition-list": { description: "<dl> elements must only contain <dt>, <dd>, <div>, <script>, <template>, or <style>.", guidance: "Definition lists have strict content requirements. Only <dt> (terms), <dd> (definitions), and <div> (for grouping dt/dd pairs) are valid children. Other elements break the list structure for screen readers. Move invalid elements outside the <dl>, or if they represent a term change to <dt>, if a definition change to <dd>. Styling wrappers should be replaced with <div> elements containing <dt>/<dd> pairs.", messages: { "<dl> contains invalid child <{0}>.": "<dl> contains invalid child <{0}>." } },
5348
5348
  "aria/aria-roles": { description: "ARIA role values must be valid.", guidance: "Invalid role values are ignored by assistive technologies, meaning the element will not have the intended semantics. Check the spelling and use only roles defined in the WAI-ARIA specification. Common roles include: button, link, navigation, main, dialog, alert, tab, tabpanel, menu, menuitem.", messages: { 'Invalid ARIA role "{0}".': 'Invalid ARIA role "{0}".' } },
5349
5349
  "aria/aria-valid-attr": { description: "ARIA attributes must be valid (correctly spelled).", guidance: "Misspelled ARIA attributes are ignored by assistive technologies. Check the spelling against the WAI-ARIA specification. Common mistakes: aria-labeledby (should be aria-labelledby), aria-role (should be role), aria-description (valid in ARIA 1.3+).", messages: { 'Invalid ARIA attribute "{0}".': 'Invalid ARIA attribute "{0}".' } },
5350
5350
  "aria/aria-valid-attr-value": { description: "ARIA attributes must have valid values.", guidance: "Each ARIA attribute accepts specific value types. Boolean attributes (aria-hidden, aria-disabled) accept only 'true' or 'false'. Tristate attributes (aria-checked, aria-pressed) also accept 'mixed'. Token attributes (aria-live, aria-autocomplete) accept predefined values. ID reference attributes (aria-labelledby, aria-describedby) must reference existing element IDs.", messages: { '{0} must be "true" or "false", got "{1}".': '{0} must be "true" or "false", got "{1}".', '{0} must be "true", "false", or "mixed", got "{1}".': '{0} must be "true", "false", or "mixed", got "{1}".', '{0} must be an integer, got "{1}".': '{0} must be an integer, got "{1}".', '{0} must be a number, got "{1}".': '{0} must be a number, got "{1}".', 'Invalid value "{0}" for {1}.': 'Invalid value "{0}" for {1}.' } },
@@ -5435,10 +5435,10 @@ const Jn = {
5435
5435
  "landmarks/complementary-is-top-level": { description: "El landmark aside (complementary) debe ser de nivel superior o estar directamente dentro de main.", guidance: "El landmark complementary (aside) debe ser de nivel superior o un hijo directo de main. Anidar aside profundamente dentro de otros landmarks reduce su descubrimiento para los usuarios de lectores de pantalla que navegan por landmarks.", messages: { "Complementary landmark should be top-level.": "El landmark complementary debe ser de nivel superior." } },
5436
5436
  "landmarks/landmark-unique": { description: "Los landmarks deben tener etiquetas únicas cuando hay múltiples del mismo tipo.", guidance: "Cuando una página tiene múltiples landmarks del mismo tipo (por ejemplo, múltiples elementos nav), cada uno debe tener un nombre accesible único mediante aria-label o aria-labelledby. Esto ayuda a los usuarios de lectores de pantalla a distinguirlos (por ejemplo, 'Navegación principal' vs 'Navegación del pie de página').", messages: { 'Multiple {0} landmarks have the same label "{1}".': 'Múltiples landmarks {0} tienen la misma etiqueta "{1}".', "Multiple {0} landmarks have no label. Add unique aria-label attributes.": "Múltiples landmarks {0} no tienen etiqueta. Agregue atributos aria-label únicos." } },
5437
5437
  "landmarks/region": { description: "Todo el contenido de la página debe estar contenido dentro de landmarks.", guidance: "Los usuarios de lectores de pantalla navegan las páginas por landmarks. El contenido fuera de los landmarks es más difícil de encontrar y comprender. Envuelva todo el contenido visible en landmarks apropiados: <header>, <nav>, <main>, <aside>, <footer>, o <section> con una etiqueta. Los enlaces de salto pueden existir fuera de los landmarks.", messages: { "Content is not contained within a landmark region.": "El contenido no está contenido dentro de una región landmark." } },
5438
- "adaptable/list-children": { description: "<ul> y <ol> solo deben contener <li>, <script> o <template> como hijos directos.", guidance: "Los lectores de pantalla anuncian la estructura de la lista ('lista con 5 elementos') basándose en el marcado correcto. Colocar elementos que no son <li> directamente dentro de <ul> u <ol> rompe esta estructura. Envuelva el contenido en elementos <li>, o si necesita divs envolventes para el estilo, aplique los estilos a los elementos <li> directamente y elimine el envoltorio (por ejemplo, cambie <ul><div>item</div></ul> a <ul><li>item</li></ul>).", messages: { "List contains non-<li> child <{0}>.": "La lista contiene un hijo no <li>: <{0}>." } },
5438
+ "adaptable/list-children": { description: "<ul> y <ol> solo deben contener <li>, <script>, <template> o <style> como hijos directos.", guidance: "Los lectores de pantalla anuncian la estructura de la lista ('lista con 5 elementos') basándose en el marcado correcto. Colocar elementos que no son <li> directamente dentro de <ul> u <ol> rompe esta estructura. Envuelva el contenido en elementos <li>, o si necesita divs envolventes para el estilo, aplique los estilos a los elementos <li> directamente y elimine el envoltorio (por ejemplo, cambie <ul><div>item</div></ul> a <ul><li>item</li></ul>).", messages: { "List contains non-<li> child <{0}>.": "La lista contiene un hijo no <li>: <{0}>." } },
5439
5439
  "adaptable/listitem-parent": { description: "Los elementos <li> deben estar contenidos en un <ul>, <ol> o <menu>.", guidance: "Los elementos de lista (<li>) solo tienen significado semántico dentro de un contenedor de lista (<ul>, <ol> o <menu>). Fuera de estos contenedores, las tecnologías de asistencia no pueden transmitir la relación de lista. Envuelva los elementos <li> en el contenedor de lista apropiado.", messages: { "<li> is not contained in a <ul>, <ol>, or <menu>.": "<li> no está contenido en un <ul>, <ol> o <menu>." } },
5440
5440
  "adaptable/dl-children": { description: "Los elementos <dt> y <dd> deben estar contenidos en un <dl>.", guidance: "Los términos de definición (<dt>) y las definiciones (<dd>) solo tienen significado semántico dentro de una lista de definiciones (<dl>). Fuera de <dl>, se tratan como texto genérico. Envuelva los pares relacionados de <dt> y <dd> en un elemento <dl> para transmitir la relación término/definición a las tecnologías de asistencia.", messages: { "<{0}> is not contained in a <dl>.": "<{0}> no está contenido en un <dl>." } },
5441
- "adaptable/definition-list": { description: "Los elementos <dl> solo deben contener <dt>, <dd>, <div>, <script> o <template>.", guidance: "Las listas de definiciones tienen requisitos estrictos de contenido. Solo <dt> (términos), <dd> (definiciones) y <div> (para agrupar pares dt/dd) son hijos válidos. Otros elementos rompen la estructura de la lista para los lectores de pantalla. Mueva los elementos inválidos fuera del <dl>, o si representan un término cámbielos a <dt>, si son una definición cámbielos a <dd>. Los envoltorios de estilo deben reemplazarse con elementos <div> que contengan pares <dt>/<dd>.", messages: { "<dl> contains invalid child <{0}>.": "<dl> contiene un hijo inválido <{0}>." } },
5441
+ "adaptable/definition-list": { description: "Los elementos <dl> solo deben contener <dt>, <dd>, <div>, <script>, <template> o <style>.", guidance: "Las listas de definiciones tienen requisitos estrictos de contenido. Solo <dt> (términos), <dd> (definiciones) y <div> (para agrupar pares dt/dd) son hijos válidos. Otros elementos rompen la estructura de la lista para los lectores de pantalla. Mueva los elementos inválidos fuera del <dl>, o si representan un término cámbielos a <dt>, si son una definición cámbielos a <dd>. Los envoltorios de estilo deben reemplazarse con elementos <div> que contengan pares <dt>/<dd>.", messages: { "<dl> contains invalid child <{0}>.": "<dl> contiene un hijo inválido <{0}>." } },
5442
5442
  "aria/aria-roles": { description: "Los valores de rol ARIA deben ser válidos.", guidance: "Los valores de rol inválidos son ignorados por las tecnologías de asistencia, lo que significa que el elemento no tendrá la semántica prevista. Verifique la ortografía y use solo roles definidos en la especificación WAI-ARIA. Los roles comunes incluyen: button, link, navigation, main, dialog, alert, tab, tabpanel, menu, menuitem.", messages: { 'Invalid ARIA role "{0}".': 'Rol ARIA inválido "{0}".' } },
5443
5443
  "aria/aria-valid-attr": { description: "Los atributos ARIA deben ser válidos (correctamente escritos).", guidance: "Los atributos ARIA mal escritos son ignorados por las tecnologías de asistencia. Verifique la ortografía contra la especificación WAI-ARIA. Errores comunes: aria-labeledby (debe ser aria-labelledby), aria-role (debe ser role), aria-description (válido en ARIA 1.3+).", messages: { 'Invalid ARIA attribute "{0}".': 'Atributo ARIA inválido "{0}".' } },
5444
5444
  "aria/aria-valid-attr-value": { description: "Los atributos ARIA deben tener valores válidos.", guidance: "Cada atributo ARIA acepta tipos de valores específicos. Los atributos booleanos (aria-hidden, aria-disabled) aceptan solo 'true' o 'false'. Los atributos triestado (aria-checked, aria-pressed) también aceptan 'mixed'. Los atributos de token (aria-live, aria-autocomplete) aceptan valores predefinidos. Los atributos de referencia de ID (aria-labelledby, aria-describedby) deben referenciar IDs de elementos existentes.", messages: { '{0} must be "true" or "false", got "{1}".': '{0} debe ser "true" o "false", se obtuvo "{1}".', '{0} must be "true", "false", or "mixed", got "{1}".': '{0} debe ser "true", "false" o "mixed", se obtuvo "{1}".', '{0} must be an integer, got "{1}".': '{0} debe ser un entero, se obtuvo "{1}".', '{0} must be a number, got "{1}".': '{0} debe ser un número, se obtuvo "{1}".', 'Invalid value "{0}" for {1}.': 'Valor inválido "{0}" para {1}.' } },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@accesslint/core",
3
- "version": "0.8.6",
3
+ "version": "0.8.7",
4
4
  "description": "Pure accessibility rule engine — WCAG audit with zero browser dependencies",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",