feat(:accessibility): Add accessibility fields to class chart

This commit is contained in:
Cory Gwin
2022-04-07 13:08:35 +00:00
committed by GitHub
parent d498106e90
commit bfca242958
10 changed files with 116 additions and 4 deletions

View File

@@ -345,8 +345,34 @@ const setDirection = (dir) => {
direction = dir;
};
let title = '';
export const setTitle = function (txt) {
let sanitizedText = sanitizeText(txt, configApi.getConfig());
title = sanitizedText;
};
export const getTitle = function () {
return title;
};
let accDescription = '';
export const setAccDescription = function (txt) {
let sanitizedText = sanitizeText(txt, configApi.getConfig());
accDescription = sanitizedText;
};
export const getAccDescription = function () {
return accDescription;
};
export default {
parseDirective,
setTitle,
getTitle,
getAccDescription,
setAccDescription,
getConfig: () => configApi.getConfig().class,
addClass,
bindFunctions,