Skip to content

Commit

Permalink
render toolbar ariaLabel
Browse files Browse the repository at this point in the history
  • Loading branch information
birm committed Jul 19, 2024
1 parent ab77a40 commit 6dafdf6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions components/toolbar/toolbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@ CaToolbar.prototype.__createCheck = function(options) {
icon.classList.add('material-icons');
icon.classList.add('md-24');
icon.textContent = options.icon;
if (options.ariaLabel) icon.ariaLabel = options.ariaLabel;
icon.htmlFor = id;
if (options.title) {
tippy(icon, {
Expand Down Expand Up @@ -275,6 +276,7 @@ CaToolbar.prototype.__createRadio = function(options) {
if (options.icon) {
icon.classList.add('material-icons');
icon.classList.add('md-24');
if (options.ariaLabel) icon.ariaLabel = options.ariaLabel;
icon.textContent = options.icon;
} else {
let _fitContent = 'fit-content';
Expand Down Expand Up @@ -332,6 +334,7 @@ CaToolbar.prototype.__createMultiStateBtns = function(options) {
icon.id = randomId(); // create a timestamp id
icon.classList.add('material-icons');
icon.classList.add('md-24');
if (options.ariaLabel) icon.ariaLabel = options.ariaLabel;
icon.classList.add(0);
icon.dataset.state = 0;
icon.textContent = options.icon;
Expand Down Expand Up @@ -385,6 +388,7 @@ CaToolbar.prototype.__createMultiDropDown = function(options) {
const icon = document.createElement('label');
icon.classList.add('material-icons');
icon.classList.add('md-24');
if (options.ariaLabel) icon.ariaLabel = options.ariaLabel;
icon.textContent = options.icon;
icon.htmlFor = id;
if (options.title) {
Expand Down Expand Up @@ -512,6 +516,7 @@ CaToolbar.prototype.__createDropDown = function(options) {
const icon = document.createElement('label');
icon.classList.add('material-icons');
icon.classList.add('md-24');
if (options.ariaLabel) icon.ariaLabel = options.ariaLabel;
icon.textContent = options.icon;
icon.htmlFor = id;
if (options.title) {
Expand Down

0 comments on commit 6dafdf6

Please sign in to comment.