fix(Pill): selectable by keyboard#22839
Conversation
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit e5f3ddb:
|
Asset size changes
Baseline commit: 251b17640880ca91f59ced2b17e8368c4017ea71 (build) |
📊 Bundle size report🤖 This report was generated against 251b17640880ca91f59ced2b17e8368c4017ea71 |
Perf Analysis (
|
| Scenario | Current PR Ticks | Baseline Ticks | Ratio |
|---|---|---|---|
| PortalMinimalPerf.default | 144 | 123 | 1.17:1 |
| AttachmentMinimalPerf.default | 131 | 119 | 1.1:1 |
| ImageMinimalPerf.default | 321 | 294 | 1.09:1 |
| RadioGroupMinimalPerf.default | 375 | 348 | 1.08:1 |
| ChatDuplicateMessagesPerf.default | 248 | 233 | 1.06:1 |
| FlexMinimalPerf.default | 236 | 222 | 1.06:1 |
| MenuButtonMinimalPerf.default | 1427 | 1352 | 1.06:1 |
| PopupMinimalPerf.default | 528 | 498 | 1.06:1 |
| TableMinimalPerf.default | 330 | 311 | 1.06:1 |
| AvatarMinimalPerf.default | 157 | 150 | 1.05:1 |
| FormMinimalPerf.default | 332 | 317 | 1.05:1 |
| RefMinimalPerf.default | 206 | 197 | 1.05:1 |
| SplitButtonMinimalPerf.default | 3663 | 3502 | 1.05:1 |
| ToolbarMinimalPerf.default | 792 | 755 | 1.05:1 |
| ItemLayoutMinimalPerf.default | 1012 | 972 | 1.04:1 |
| LayoutMinimalPerf.default | 300 | 288 | 1.04:1 |
| ListCommonPerf.default | 525 | 505 | 1.04:1 |
| StatusMinimalPerf.default | 566 | 544 | 1.04:1 |
| DividerMinimalPerf.default | 294 | 285 | 1.03:1 |
| EmbedMinimalPerf.default | 3453 | 3358 | 1.03:1 |
| ListWith60ListItems.default | 547 | 533 | 1.03:1 |
| ProviderMinimalPerf.default | 338 | 329 | 1.03:1 |
| VideoMinimalPerf.default | 536 | 521 | 1.03:1 |
| AnimationMinimalPerf.default | 454 | 446 | 1.02:1 |
| BoxMinimalPerf.default | 280 | 275 | 1.02:1 |
| CarouselMinimalPerf.default | 394 | 388 | 1.02:1 |
| ChatMinimalPerf.default | 618 | 608 | 1.02:1 |
| ListMinimalPerf.default | 429 | 421 | 1.02:1 |
| LoaderMinimalPerf.default | 570 | 557 | 1.02:1 |
| TextAreaMinimalPerf.default | 414 | 405 | 1.02:1 |
| TreeMinimalPerf.default | 678 | 665 | 1.02:1 |
| AttachmentSlotsPerf.default | 929 | 920 | 1.01:1 |
| ButtonSlotsPerf.default | 456 | 453 | 1.01:1 |
| CardMinimalPerf.default | 464 | 461 | 1.01:1 |
| DatepickerMinimalPerf.default | 4679 | 4635 | 1.01:1 |
| DropdownMinimalPerf.default | 2554 | 2534 | 1.01:1 |
| LabelMinimalPerf.default | 316 | 314 | 1.01:1 |
| ListNestedPerf.default | 460 | 457 | 1.01:1 |
| GridMinimalPerf.default | 275 | 276 | 1:1 |
| InputMinimalPerf.default | 1081 | 1078 | 1:1 |
| MenuMinimalPerf.default | 709 | 709 | 1:1 |
| SliderMinimalPerf.default | 1411 | 1414 | 1:1 |
| TableManyItemsPerf.default | 1597 | 1601 | 1:1 |
| TextMinimalPerf.default | 273 | 273 | 1:1 |
| CustomToolbarPrototype.default | 2281 | 2277 | 1:1 |
| AlertMinimalPerf.default | 223 | 226 | 0.99:1 |
| ButtonOverridesMissPerf.default | 1236 | 1243 | 0.99:1 |
| CheckboxMinimalPerf.default | 2226 | 2253 | 0.99:1 |
| DropdownManyItemsPerf.default | 562 | 570 | 0.99:1 |
| ProviderMergeThemesPerf.default | 1042 | 1051 | 0.99:1 |
| TooltipMinimalPerf.default | 884 | 891 | 0.99:1 |
| DialogMinimalPerf.default | 619 | 634 | 0.98:1 |
| HeaderMinimalPerf.default | 293 | 298 | 0.98:1 |
| RosterPerf.default | 909 | 932 | 0.98:1 |
| ReactionMinimalPerf.default | 297 | 303 | 0.98:1 |
| HeaderSlotsPerf.default | 613 | 630 | 0.97:1 |
| SegmentMinimalPerf.default | 273 | 281 | 0.97:1 |
| TreeWith60ListItems.default | 138 | 142 | 0.97:1 |
| IconMinimalPerf.default | 493 | 521 | 0.95:1 |
| SkeletonMinimalPerf.default | 273 | 289 | 0.94:1 |
| AccordionMinimalPerf.default | 109 | 122 | 0.89:1 |
| ChatWithPopoverPerf.default | 289 | 328 | 0.88:1 |
| ButtonMinimalPerf.default | 110 | 134 | 0.82:1 |
| keyCombinations: [{ keyCode: keyboardKey.Delete }, { keyCode: keyboardKey.Backspace }], | ||
| }, | ||
| }), | ||
| ...(p.selectable && { |
There was a problem hiding this comment.
should actionable also add the enter and space key handling ?
There was a problem hiding this comment.
I think yes as we also add role=buton in this case
There was a problem hiding this comment.
That makes sense, but I think we will miss a dismissible prop here then, WDYT?
There was a problem hiding this comment.
@ling1726 @jurokapsiar check what you think about a08c6bf
There was a problem hiding this comment.
I am a little bit affraid of this as it is a big and hard to discover breaking change. I understand it would make sense to add dismissable, but do we need to change the meaning of actionable for that?
There was a problem hiding this comment.
looking at the whole PR I think it is ok. However the pill needs to be focusable also if it is dismissible - so that user can navigate to it before being able to delete
* fix: pill behavior * fix: Pill by adding default accessibility and considering selectable to add onclick * chore: remove unstable comment * chore: add missing role prop * chore: handle dismiss and actionable * chore: add role button when selectable * chore: add changelog
Current Behavior
Selecting
Pillby keyboard isn't workingNew Behavior
Selecting
Pillis now working by keyboard and mouse