Skip to content

Accessibility Traits

Part of the HoloScript Traits reference. Browse: Interaction · All Traits

Accessibility Traits

@alt_text

Category: Accessibility Tags: screen-reader, vision-impairment, description, text

Alternative text for screen readers.

hsplus
object Logo @alt_text("Company logo - blue square with letter H") {
  geometry: 'plane'
  texture: 'logo.png'
}
ConfigTypeDefaultDescription
textstring''Description text
prioritystring'polite''polite', 'assertive'

@screen_reader

Screen reader focus and navigation.

hsplus
object Menu @screen_reader(role: 'menu', label: 'Main navigation') {
  children: [...]
}
ConfigTypeDefaultDescription
rolestring'generic'ARIA-like role
labelstring''Accessible name
live_regionbooleanfalseAnnounce changes

@high_contrast

High contrast mode support.

hsplus
object Button @high_contrast {
  normal_color: '#333'
  high_contrast_color: '#FFF'
}
ConfigTypeDefaultDescription
border_widthnumber2Border in HC mode
invertbooleanfalseInvert colors

@motion_reduced

Reduced motion accessibility.

hsplus
object Spinner @motion_reduced {
  animation: 'spin'  // Disabled when preference set
}
ConfigTypeDefaultDescription
fallback_animationstring'none'Alternative animation
reduce_parallaxbooleantrueReduce parallax effects

@subtitle

Subtitle/caption display.

hsplus
object VideoPlayer @subtitle {
  subtitle_src: 'captions.vtt'
  language: 'en'
}
ConfigTypeDefaultDescription
font_sizenumber24Text size
background_opacitynumber0.75Background alpha
positionstring'bottom''top', 'bottom'

See Also

Released under the MIT License.