AccessibilityConfig class
Runtime-configurable accessibility defaults for ui_framework_kit.
All values are immutable — call
UiFrameworkConfig.configure (or pass your own instance to a widget
that accepts accessibility:) to override. Per-widget parameters
such as semanticLabel always take precedence over these defaults.
UiFrameworkConfig.configure(
accessibility: const AccessibilityConfig(
clearActionLabel: 'मेटाउनुहोस्',
dismissActionLabel: 'बन्द गर्नुहोस्',
addStatusIconsBesideColor: true,
),
);
- Annotations
Constructors
- AccessibilityConfig({String clearActionLabel = 'Clear', String dismissActionLabel = 'Dismiss', String playVideoLabel = 'Play video', String previousSlideLabel = 'Previous slide', String nextSlideLabel = 'Next slide', String correctAnswerSemanticValue = 'correct', String incorrectAnswerSemanticValue = 'incorrect', double minTouchTargetSize = 48.0, bool addStatusIconsBesideColor = true, bool respectReduceMotion = true})
-
Creates an immutable accessibility configuration. All fields have
English-language defaults that align with WCAG 2.2 AA wording;
override individual fields to localize.
const
Properties
- addStatusIconsBesideColor → bool
-
When
true(default), widgets that signal status with color (MCQ correct/incorrect, error/success banners) also render an adjacent icon, so the state is conveyed for color-blind users.final - clearActionLabel → String
-
Tooltip / semantic label used by the search-field clear button.
final
- correctAnswerSemanticValue → String
-
Announced by the MCQ widget for a correct selection (paired with
the green color so the state is not color-only).
final
- dismissActionLabel → String
-
Tooltip / semantic label for the close button on dismissible
banners (e.g. DynamicMessageWidget).
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- incorrectAnswerSemanticValue → String
-
Announced by the MCQ widget for an incorrect selection.
final
- minTouchTargetSize → double
-
Minimum touch-target size (logical px) applied to interactive
widgets in the kit. Defaults to 48 — the WCAG 2.2 AA target.
final
- nextSlideLabel → String
-
Semantic label for the "next slide" affordance on the banner
carousel (only rendered when reduce-motion is on).
final
- playVideoLabel → String
-
Semantic label announced when the YouTube placeholder is focused.
final
- previousSlideLabel → String
-
Semantic label for the "previous slide" affordance on the banner
carousel (only rendered when reduce-motion is on).
final
- respectReduceMotion → bool
-
When
true(default), motion-heavy widgets honorMediaQuery.disableAnimationsOf(context)and freeze when the user has requested reduced motion at the OS level.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
copyWith(
{String? clearActionLabel, String? dismissActionLabel, String? playVideoLabel, String? previousSlideLabel, String? nextSlideLabel, String? correctAnswerSemanticValue, String? incorrectAnswerSemanticValue, double? minTouchTargetSize, bool? addStatusIconsBesideColor, bool? respectReduceMotion}) → AccessibilityConfig - Returns a copy with selected fields replaced.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited