mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-07-28 17:02:04 +03:00
Updated generic tab styles and js to force accessible usage
Added use of more accessible tags to create tabbed-interfaces then updated css and JS to require use of those attributes rather than custom techniques. Updated relevant parts of app. Some custom parts using their own tabs though, something to improve in future.
This commit is contained in:
@ -140,10 +140,9 @@ export class ImageManager extends Component {
|
||||
}
|
||||
|
||||
setActiveFilterTab(filterName) {
|
||||
this.filterTabs.forEach(t => t.classList.remove('selected'));
|
||||
const activeTab = this.filterTabs.find(t => t.dataset.filter === filterName);
|
||||
if (activeTab) {
|
||||
activeTab.classList.add('selected');
|
||||
for (const tab of this.filterTabs) {
|
||||
const selected = tab.dataset.filter === filterName;
|
||||
tab.setAttribute('aria-selected', selected ? 'true' : 'false');
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user