Commit 4f284f6
committed
fix(emcn): let a custom modal field associate its hint with the control it wraps
`ChipModalField` computes `aria-required`/`aria-invalid`/`aria-describedby` from
its own state, but `type='custom'` returned its children untouched — so the
`hint` and `error` text it renders was visible and never announced. The field
cannot apply the ARIA itself here: a custom child may be a bare input or a
wrapper several levels above one, which is the same reason `associatesLabel`
already excludes custom from the label's `htmlFor`.
Adds a function form for custom children that receives the ARIA, so the
consumer — which knows where focus lands — attaches it. Existing `ReactNode`
children are unaffected; all five current custom-field call sites keep working
untouched.
Uses it for the Atlassian API token field, whose coverage hint this branch had
just relocated onto a custom field.1 parent 080fce4 commit 4f284f6
2 files changed
Lines changed: 38 additions & 16 deletions
File tree
- apps/sim/app/workspace/[workspaceId]/integrations/components/connect-service-account-modal
- packages/emcn/src/components/chip-modal
Lines changed: 17 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
504 | 504 | | |
505 | 505 | | |
506 | 506 | | |
507 | | - | |
508 | | - | |
509 | | - | |
510 | | - | |
511 | | - | |
512 | | - | |
513 | | - | |
514 | | - | |
515 | | - | |
516 | | - | |
517 | | - | |
518 | | - | |
519 | | - | |
520 | | - | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
521 | 524 | | |
522 | 525 | | |
523 | 526 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
549 | 549 | | |
550 | 550 | | |
551 | 551 | | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
552 | 562 | | |
553 | 563 | | |
554 | | - | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
555 | 574 | | |
556 | 575 | | |
557 | 576 | | |
| |||
718 | 737 | | |
719 | 738 | | |
720 | 739 | | |
721 | | - | |
| 740 | + | |
722 | 741 | | |
723 | 742 | | |
724 | 743 | | |
| |||
0 commit comments