* Create the indicator DOM element * @returns {HTMLElement}
()
| 13 | * @returns {HTMLElement} |
| 14 | */ |
| 15 | createElement() { |
| 16 | const container = document.createElement('div'); |
| 17 | container.className = 'validation-indicator'; |
| 18 | container.setAttribute('aria-live', 'polite'); |
| 19 | container.setAttribute('aria-atomic', 'true'); |
| 20 | |
| 21 | const dot = document.createElement('span'); |
| 22 | dot.className = 'validation-dot'; |
| 23 | dot.setAttribute('aria-hidden', 'true'); |
| 24 | |
| 25 | const message = document.createElement('span'); |
| 26 | message.className = 'validation-message'; |
| 27 | |
| 28 | container.appendChild(dot); |
| 29 | container.appendChild(message); |
| 30 | |
| 31 | return container; |
| 32 | } |
| 33 | |
| 34 | /** |
| 35 | * Update the validation state |