Skip to content

accessibility

Accessibility configuration for colorblind-friendly rendering.

Provides alternative visual encodings so that progress bar status can be distinguished without relying on color perception alone.

Classes

AccessibilityConfig dataclass

Visual encoding configuration for progress bar rendering.

Controls which characters are used for each segment of the progress bar and whether the legend is always displayed.

Attributes:

Name Type Description
succeeded BarStyle

Style for completed/succeeded jobs.

failed BarStyle

Style for failed jobs.

running BarStyle

Style for currently running jobs.

remaining BarStyle

Style for remaining/pending jobs.

incomplete BarStyle

Style for incomplete jobs (workflow interrupted).

show_legend bool

If True, always show the legend (not just on failure).

Source code in snakesee/tui/accessibility.py
@dataclass(frozen=True, slots=True)
class AccessibilityConfig:
    """Visual encoding configuration for progress bar rendering.

    Controls which characters are used for each segment of the progress bar
    and whether the legend is always displayed.

    Attributes:
        succeeded: Style for completed/succeeded jobs.
        failed: Style for failed jobs.
        running: Style for currently running jobs.
        remaining: Style for remaining/pending jobs.
        incomplete: Style for incomplete jobs (workflow interrupted).
        show_legend: If True, always show the legend (not just on failure).
    """

    succeeded: BarStyle
    failed: BarStyle
    running: BarStyle
    remaining: BarStyle
    incomplete: BarStyle
    show_legend: bool

BarStyle dataclass

Character and label for a single progress bar segment.

Attributes:

Name Type Description
char str

The character used to fill the segment.

label str

Human-readable label for the legend.

Source code in snakesee/tui/accessibility.py
@dataclass(frozen=True, slots=True)
class BarStyle:
    """Character and label for a single progress bar segment.

    Attributes:
        char: The character used to fill the segment.
        label: Human-readable label for the legend.
    """

    char: str
    label: str