feat: add accDescription along with test page

This commit is contained in:
Kate Higa
2022-04-08 12:57:42 -07:00
parent 904826b3e1
commit 81b982ac20
4 changed files with 68 additions and 3 deletions

View File

@@ -4,6 +4,7 @@ import journeyDb from './journeyDb';
import svgDraw from './svgDraw';
import { getConfig } from '../../config';
import { configureSvgSize } from '../../utils';
import addSVGAccessibilityFields from '../../accessibility';
parser.yy = journeyDb;
@@ -100,6 +101,7 @@ export const draw = function (text, id) {
.attr('font-weight', 'bold')
.attr('y', 25);
}
const height = box.stopy - box.starty + 2 * conf.diagramMarginY;
const width = LEFT_MARGIN + box.stopx + 2 * conf.diagramMarginX;
@@ -120,6 +122,8 @@ export const draw = function (text, id) {
diagram.attr('viewBox', `${box.startx} -25 ${width} ${height + extraVertForTitle}`);
diagram.attr('preserveAspectRatio', 'xMinYMin meet');
diagram.attr('height', height + extraVertForTitle + 25);
addSVGAccessibilityFields(parser.yy, diagram, id);
};
export const bounds = {