Skip to main content
cngx-src documentation

provideA11yPreferences

Functioncore/themingv0.1.0

projects/core/theming/a11y-preferences.ts

Description#

Install all four accessibility axes (density, text-scale, motion, contrast) behind one call. Each axis is set from its matching with* feature, or left at its own library default when the feature is omitted. Duplicate axis features are last-wins.

This is composition over configuration (Pillar 3): the aggregator only forwards the resolved initials to the existing provideDensity / provideTextScale / provideMotion / provideContrast, so no reflector logic is duplicated. The accessibility panel then binds to the four writable signals via injectA11yPreferences.

bootstrapApplication(AppComponent, {
  providers: [
    provideA11yPreferences(withTextScale('lg'), withMotion('reduced')),
  ],
});

Signature#

provideA11yPreferences(...features: undefined)

Parameters#

@paramfeatures

Returns#

EnvironmentProviders