(element: Element | null)
| 146 | } |
| 147 | |
| 148 | function removeAriaDescribedBy(element: Element | null) { |
| 149 | const newDescribedBy = getAriaDescribedBy(element).filter((s) => s !== id) |
| 150 | if (newDescribedBy.length) { |
| 151 | element?.setAttribute('aria-describedby', newDescribedBy.join(' ')) |
| 152 | } else { |
| 153 | element?.removeAttribute('aria-describedby') |
| 154 | } |
| 155 | } |
| 156 | |
| 157 | if (show) { |
| 158 | removeAriaDescribedBy(previousActiveAnchor) |
no test coverage detected