Skip to content

GlButton: label variant should not render a <button>

This follows-up on gitlab!38421 (comment 421432692)

GlButton supports a label mode that can be used to render text with some basic button styles. Currently, this variant renders an inactive <button>, which seems bad practice in terms of accessibility as the label should be presentational only, so it would be preferable to render a <span> or a <div> instead.

When used in a button group, the actual button in the group could leverage the aria-labelledby attribute to reference the label button.