mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-16 01:52:19 +08:00
fix(form): shadow components using aria-labelledby do not use modern syntax (#26836)
resolves #26829
This commit is contained in:
@ -22,7 +22,10 @@ export const createLegacyFormController = (el: HTMLLegacyFormControlElement): Le
|
||||
* in the light DOM.
|
||||
*/
|
||||
const hasLabelProp = (controlEl as any).label !== undefined || hasLabelSlot(controlEl);
|
||||
const hasAriaLabelAttribute = controlEl.hasAttribute('aria-label') || controlEl.hasAttribute('aria-labelledby');
|
||||
const hasAriaLabelAttribute =
|
||||
controlEl.hasAttribute('aria-label') ||
|
||||
// Shadow DOM form controls cannot use aria-labelledby
|
||||
(controlEl.hasAttribute('aria-labelledby') && controlEl.shadowRoot === null);
|
||||
|
||||
/**
|
||||
* Developers can manually opt-out of the modern form markup
|
||||
|
Reference in New Issue
Block a user