Rich text / foldkit-richtext-dom/host

EditorName

type · packages/richtext-dom/src/host.ts:111

type EditorName =
  | {
      readonly label: string
      readonly labelledBy?: undefined
    }
  | {
      readonly labelledBy: string
      readonly label?: undefined
    }
  | {
      readonly label?: undefined
      readonly labelledBy?: undefined
    }

How an editor is named for assistive technology: by a label of its own (aria-label) or by the element that labels it (aria-labelledby), never both.