{% extends 'base.html' %}
{% block title %}Health Monitor - ePortal{% if current_unit() %} [{{ current_unit().title }}]{% endif %}{% endblock %}
{# A canvas is pixels, so the table beside it is both the chart's text
alternative and the only route to a slice's drill-down that is not a click. #}
{% macro distribution_chart(chart_id, name, slice_column, chart_data) %}
{# Announcing the canvas too would read every figure twice. #}
{% if not chart_data['data'] %}
{# A table of the chart's figures with no figures in it is column headings
and nothing else -- and with the canvas hidden it would be all this
section says. The name is repeated here because the caption goes with
the table and the visible title is drawn in canvas pixels. #}
{{ name }}: no servers to report.
{% else %}
{# Wide data scrolls inside its own container so the page still reflows;
focusable, or only a mouse could reach the scrolled-off columns, and
named, or that stop announces as a group with nothing to say. #}
{# Chart.js draws the name inside the canvas, out of reach of anyone the
canvas is hidden from. #}
{# href, so the option is focusable and Enter reaches the
click handler; dropdown-item, so the menu answers the
arrow keys Bootstrap binds on the toggle. #}
{{ k }}