Skip to content
BigBang

Popular

    ↑↓Navigate↵OpenEscClose
    TR

    Components

    SaveBar

    A bar that rises from the bottom while a form has unsaved changes, with Save and Discard.

    Storybook
    Storybook
    Source
    Source

    The bar is a section region named “Unsaved changes”. The message is in role="status"; it is read when the bar opens. While closed the bar has inert, so invisible buttons stay out of the focus order.

    Key Behaviour
    Tab At the end of the page, to Discard, then Save.
    Enter, Space Runs the button.

    Focus does not move when the bar opens; users keep typing. If the bar closes after Save, move focus somewhere meaningful, such as the page heading.

    Example Output
    On open “You have unsaved changes”
    On save “Saved”

    Text has 4.5:1, the top border 3:1; the shadow is only for depth.

    Criterion How SaveBar meets it What product teams must do
    2.4.11 Focus not obscured — Do not let a fixed bar cover the focused field: leave room at the bottom, or use sticky.
    3.3.4 Error prevention A browser prompt before leaving. —
    4.1.3 Status messages Opening and saving are announced. —