cm-chessboard 3.16.8 → 3.16.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -104,8 +104,14 @@ export class ChessboardView {
|
|
|
104
104
|
Svg.removeElement(this.svg)
|
|
105
105
|
}
|
|
106
106
|
this.svg = Svg.createSvg(this.chessboard.element)
|
|
107
|
+
let description = document.createElement("description")
|
|
108
|
+
description.innerText = "Chessboard"
|
|
109
|
+
description.id = "svg-description"
|
|
110
|
+
this.svg.appendChild(description)
|
|
107
111
|
let cssClass = this.chessboard.props.style.cssClass ? this.chessboard.props.style.cssClass : "default"
|
|
108
112
|
this.svg.setAttribute("class", "cm-chessboard border-type-" + this.chessboard.props.style.borderType + " " + cssClass)
|
|
113
|
+
this.svg.setAttribute("aria-describedby", "svg-description")
|
|
114
|
+
this.svg.setAttribute("role", "img")
|
|
109
115
|
this.updateMetrics()
|
|
110
116
|
this.boardGroup = Svg.addElement(this.svg, "g", {class: "board"})
|
|
111
117
|
this.coordinatesGroup = Svg.addElement(this.svg, "g", {class: "coordinates"})
|