Skip to content

Button guidance accessibility issue #281

@aardrian

Description

@aardrian

Describe the issue

The button documentation says this:

Buttons are width: 100%; by default. Use role="button" on an inline element if you need an inline button.

The example shows a link with a button role, which overrides how the control is exposed to assistive technology. Essentially it is lying to users about its purpose and operation solely to visually not be 100% width.

Current Behavior

The documentation conflates a link with a button, with no warnings nor guidance on the different affordances nor accessibility API exposure.

Expected Behavior

Guide users to code that assigns a style to a styling issue instead of an ARIA role. For example, inline-block.

Reproduction URL

https://picocss.com/docs/buttons.html

  • Fire up a screen reader and hear how the links are announced as buttons.
  • Attempt to interact with it as if it was a button.

Understand that buttons fire on Enter and Space. Links only fire on Enter. Further, one is reversible and the other is not. Demonstration: https://adrianroselli.com/2022/04/brief-note-on-buttons-enter-and-space.html

Environment

Example: All browsers, with or without a screen reader.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions