mirror of
https://github.com/mdn/webextensions-examples.git
synced 2026-04-16 06:18:35 +02:00
Reflect bookmark state in icon title to make it accessible to screen readers (#255)
This commit is contained in:
@@ -16,6 +16,11 @@ function updateIcon() {
|
||||
},
|
||||
tabId: currentTab.id
|
||||
});
|
||||
browser.browserAction.setTitle({
|
||||
// Screen readers can see the title
|
||||
title: currentBookmark ? 'Unbookmark it!' : 'Bookmark it!',
|
||||
tabId: currentTab.id
|
||||
});
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user