Home / Function/ getAttributeObject() — astro Function Reference

getAttributeObject() — astro Function Reference

Architecture documentation for the getAttributeObject() function in a11y.ts from the astro codebase.

Entity Profile

Dependency Diagram

graph TD
  324e66f6_b877_60c9_140c_e093af26381d["getAttributeObject()"]
  7c3b1f35_d834_f912_339d_8627bdd8631a["a11y.ts"]
  324e66f6_b877_60c9_140c_e093af26381d -->|defined in| 7c3b1f35_d834_f912_339d_8627bdd8631a
  80d4bf76_ff86_d7e7_8869_b38b782ed518["getImplicitRole()"]
  80d4bf76_ff86_d7e7_8869_b38b782ed518 -->|calls| 324e66f6_b877_60c9_140c_e093af26381d
  style 324e66f6_b877_60c9_140c_e093af26381d fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/astro/src/runtime/client/dev-toolbar/apps/audit/rules/a11y.ts lines 676–683

function getAttributeObject(element: Element): Record<string, string> {
	let obj: Record<string, string> = {};
	for (let i = 0; i < element.attributes.length; i++) {
		const attribute = element.attributes.item(i)!;
		obj[attribute.name] = attribute.value;
	}
	return obj;
}

Domain

Subdomains

Called By

Frequently Asked Questions

What does getAttributeObject() do?
getAttributeObject() is a function in the astro codebase, defined in packages/astro/src/runtime/client/dev-toolbar/apps/audit/rules/a11y.ts.
Where is getAttributeObject() defined?
getAttributeObject() is defined in packages/astro/src/runtime/client/dev-toolbar/apps/audit/rules/a11y.ts at line 676.
What calls getAttributeObject()?
getAttributeObject() is called by 1 function(s): getImplicitRole.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free