Closed benrucker closed 3 months ago
Build artifact links for this commit: documentation | landing | table | demo
This is an automated comment from the deploy-preview CircleCI job.
Build artifact links for this commit: documentation | landing | table | demo
This is an automated comment from the deploy-preview CircleCI job.
Build artifact links for this commit: documentation | landing | table | demo
This is an automated comment from the deploy-preview CircleCI job.
Build artifact links for this commit: documentation | landing | table | demo
This is an automated comment from the deploy-preview CircleCI job.
Fixes no ticket
Checklist
Changes proposed in this pull request:
This PR makes
Popover
s not add atabIndex
to the target when thePopover
will not render due todisabled={true}
orcontent={undefined}
. This has been done by making sure that we do not overridetabIndex
on the popover target in those scenarios even ifopenOnTargetFocus
is also true.This is useful when rendering shared components that have conditional
Tooltips
implemented via thecontent
ordisabled
props. Before this change, those components would always be focusable.This PR does not address
Popover
s that are rendered in control mode and not open, though they exhibit similar behavior. This could be a follow-up change if desired.Popover -> Tooltip nesting
This PR is consistent with previous behavior regarding nesting a
Tooltip
in aPopover
.For context, default
Popover
s do not apply atabIndex=0
to their targets. This is becausePopover
s are by defaultPopoverInteractionKind.CLICK
, which does not meet the pre-requisite for gettingtabIndex=0
applied to the target ofPopoverInteractionKind.HOVER
.Previously, a
Popover
with a nestedTooltip
would always have a focusable target. Now, that will only be true if theTooltip
is both not disabled and has content.This behavior has been codified in the test suite.
Reviewers should focus on:
getButton
function of some sort?openOnTargetFocus
TSDoc?After
https://github.com/palantir/blueprint/assets/12519846/43efdbb4-da3d-45cd-bcd9-7f7aa4237e0d
Lines that are no longer focusable:
Lines that were never focusable:
Lines that are notably still focusable: