Skip to content

Commit

Permalink
ARIA label for the canvas
Browse files Browse the repository at this point in the history
  • Loading branch information
mgax committed Mar 25, 2024
1 parent 2371b54 commit f3d9ee7
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions ietf/templates/wagtailcharts/blocks/chart_block.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{% if self.title %}<h3>{{self.title}}</h3>{% endif %}
<canvas
id="chart-{{block.id}}"
data-datasets="{{self.datasets}}"
data-config="{{self.settings.config}}"
data-chart-type="{{self.chart_type}}"
role="img"
aria-label="A chart {% if self.title %}of {{self.title}}{%endif%}"
></canvas>

0 comments on commit f3d9ee7

Please sign in to comment.