Consume core Penta updates: Form controls, checkbox, radio by adamviktora · Pull Request #10016 · patternfly/patternfly-react

@mcoker Good point Michael!

I remember I actually was applying component="span" and isInline props before to match the core implementation (which in combination leads to these attributes: type="button" role="button" tabindex="0" being added on the <span> element, which is exactly what is in core).

So I was wondering why it is not there now.

I was just about to commit your suggestion and then I realized why I did not apply the component="span" back then. The reason is accessibility of the Popover. Although the tabindex="0" makes the span focusable, the Popover cannot be opened on pressing the enter key. It works only if the element is a <button>.

span:
https://github.com/patternfly/patternfly-react/assets/84135613/a452671a-9523-4a64-993f-89029e81c17f

button:
https://github.com/patternfly/patternfly-react/assets/84135613/534086d0-7319-4ada-aebc-5c0664510a99

Seems like this issue is related to the implementation of the Popover, so I am taking a look at that now.

For now I would keep it as <button>, so the Popover is accessible, and once we figure that out, we can add the component="span" and isInline props to match core.