Add suppress checkboxes and better ARIA roles for dialogs.

Review Request #14649 — Created Oct. 24, 2025 and updated

Information

Ink
master

Reviewers

It's common for some types of dialogs to have a suppression checkbox,
such as "Do not ask again." To ensure there's a standard approach for
this, dialogs can now have canSuppress=true set. This will place a
checkbox in the secondary actions area, at the far left.

The default text will be "Do not ask again," but this can be customized
by setting suppressText=.

It's up to the caller to determine how to suppress. The dialog doesn't
control any of this. It does provide the result of the checkbox though
as an isSuppressed property.

This will be used for upcoming confirmation utility dialogs.

Along with this, the ARIA role for modal dialogs has been updated to use
alertdialog. This will announce the dialog to screen readers, and is
the correct choice when popping up a modal dialog that requires
attention, rather than a utility dialog that is simply on screen.

Tested with and without suppression checkboxes, and with custom
label text.

Summary ID
Add suppress checkboxes and better ARIA roles for dialogs.
It's common for some types of dialogs to have a suppression checkbox, such as "Do not ask again." To ensure there's a standard approach for this, dialogs can now have `canSuppress=true` set. This will place a checkbox in the secondary actions area, at the far left. The default text will be "Do not ask again," but this can be customized by setting `suppressText=`. It's up to the caller to determine how to suppress. The dialog doesn't control any of this. It does provide the result of the checkbox though as an `isSuppressed` property. This will be used for upcoming confirmation utility dialogs. Along with this, the ARIA role for modal dialogs has been updated to use `alertdialog`. This will announce the dialog to screen readers, and is the correct choice when popping up a modal dialog that requires attention, rather than a utility dialog that is simply on screen.
af215fdc1c682e555c1afd3a8cd77227f52cb0cc

Description From Last Updated

I think I'd prefer if this was named something like isSuppressChecked. isSuppressed makes me think the dialog will handle the …

daviddavid

Seems like this should be id= or name=. This also needs the ink-c-dialog__suppress class to match the styling/docs elsewhere.

daviddavid

What does this mean?

daviddavid

This should be __suppress, to match the comment.

daviddavid

This should have defaults for canSuppress and suppressText

daviddavid
Checks run (2 succeeded)
flake8 passed.
JSHint passed.
david
  1. 
      
  2. Show all issues

    I think I'd prefer if this was named something like isSuppressChecked. isSuppressed makes me think the dialog will handle the suppression.

  3. Show all issues

    Seems like this should be id= or name=.

    This also needs the ink-c-dialog__suppress class to match the styling/docs elsewhere.

  4. Show all issues

    What does this mean?

  5. Show all issues

    This should be __suppress, to match the comment.

  6. Show all issues

    This should have defaults for canSuppress and suppressText

  7.