* fix wrong generation of aria-labelledby in tab navigation
* fix wrong test
---------
Co-authored-by: Jan Bensch <github@bensch.dev>
Co-authored-by: XhmikosR <xhmikosr@gmail.com>
this._setAttributeIfNotExists(target, 'role', 'tabpanel')
if (child.id) {
- this._setAttributeIfNotExists(target, 'aria-labelledby', `#${child.id}`)
+ this._setAttributeIfNotExists(target, 'aria-labelledby', `${child.id}`)
}
}
expect(tabPanel.hasAttribute('tabindex')).toBeFalse()
expect(tabPanel.hasAttribute('tabindex2')).toBeFalse()
- expect(tabPanel.getAttribute('aria-labelledby')).toEqual('#foo')
+ expect(tabPanel.getAttribute('aria-labelledby')).toEqual('foo')
expect(tabPanel2.hasAttribute('aria-labelledby')).toBeFalse()
})
})