constants.js — svelte Source File
Architecture documentation for constants.js, a javascript file in the svelte codebase. 2 imports, 1 dependents.
Entity Profile
Dependency Diagram
graph LR e8a7182c_bd87_2127_dd61_eaf76f720023["constants.js"] acf907b0_1e66_f8ff_53d9_27d4075ca95f["aria-query"] e8a7182c_bd87_2127_dd61_eaf76f720023 --> acf907b0_1e66_f8ff_53d9_27d4075ca95f c94956cc_e278_b193_02b1_bae1e6bfb292["axobject-query"] e8a7182c_bd87_2127_dd61_eaf76f720023 --> c94956cc_e278_b193_02b1_bae1e6bfb292 b389a21f_6de7_2a41_34f3_8efbf9045c9c["index.js"] b389a21f_6de7_2a41_34f3_8efbf9045c9c --> e8a7182c_bd87_2127_dd61_eaf76f720023 style e8a7182c_bd87_2127_dd61_eaf76f720023 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
/** @import { ARIARoleRelationConcept } from 'aria-query' */
import { roles as roles_map, elementRoles } from 'aria-query';
// @ts-expect-error package doesn't provide typings
import { AXObjects, elementAXObjects } from 'axobject-query';
export const aria_attributes =
'activedescendant atomic autocomplete busy checked colcount colindex colspan controls current describedby description details disabled dropeffect errormessage expanded flowto grabbed haspopup hidden invalid keyshortcuts label labelledby level live modal multiline multiselectable orientation owns placeholder posinset pressed readonly relevant required roledescription rowcount rowindex rowspan selected setsize sort valuemax valuemin valuenow valuetext'.split(
' '
);
/** @type {Record<string, string[]>} */
export const a11y_required_attributes = {
a: ['href'],
area: ['alt', 'aria-label', 'aria-labelledby'],
// html-has-lang
html: ['lang'],
// iframe-has-title
iframe: ['title'],
img: ['alt'],
object: ['title', 'aria-label', 'aria-labelledby']
};
export const a11y_distracting_elements = ['blink', 'marquee'];
// this excludes `<a>` and `<button>` because they are handled separately
export const a11y_required_content = [
// heading-has-content
'h1',
'h2',
'h3',
'h4',
'h5',
'h6'
];
export const a11y_labelable = [
'button',
'input',
'keygen',
'meter',
'output',
'progress',
'select',
'textarea'
];
export const a11y_interactive_handlers = [
// Keyboard events
'keypress',
'keydown',
'keyup',
// Click events
'click',
'contextmenu',
'dblclick',
'drag',
'dragend',
'dragenter',
'dragexit',
'dragleave',
// ... (275 more lines)
Domain
Subdomains
Functions
Dependencies
- aria-query
- axobject-query
Source
Frequently Asked Questions
What does constants.js do?
constants.js is a source file in the svelte codebase, written in javascript. It belongs to the Compiler domain, Transformer subdomain.
What functions are defined in constants.js?
constants.js defines 6 function(s): abstract_roles, interactive_ax_objects, interactive_roles, non_abstract_roles, non_interactive_ax_objects, non_interactive_roles.
What does constants.js depend on?
constants.js imports 2 module(s): aria-query, axobject-query.
What files import constants.js?
constants.js is imported by 1 file(s): index.js.
Where is constants.js in the architecture?
constants.js is located at packages/svelte/src/compiler/phases/2-analyze/visitors/shared/a11y/constants.js (domain: Compiler, subdomain: Transformer, directory: packages/svelte/src/compiler/phases/2-analyze/visitors/shared/a11y).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free