julianna-langston / chart2music

Turns charts into music so the blind can hear data
MIT License
29 stars 7 forks source link

Support dynamically changing chart type #480

Closed julianna-langston closed 6 months ago

julianna-langston commented 6 months ago

Chart2Music already supports dynamically change data and axis information. Can it also support changing the chart type itself?

spmealin commented 6 months ago

I think this would be really confusing for a screen reader user. Imagine, you are moving through a page, see a bar chart, keep on tabbing, decide to go back to investigate the bar chart more, and you can only find a line chart. That is a simplistic scenario, I know, but in general making changes to elements that are used as navigational landmarks (I’m not talking about ARIA landmarks) should be discouraged. I think supporting this feature implicitly tells chart authors that mutating elements in-place is acceptable.

From a technological perspective, if you change a chart from a bar chart to a line chart, should the previous focus be maintained or reset to the start of the chart? When you make a type change, are you making that change for a single layer in a chart or multiple layers? There are a number of state maintenance questions that this would open up. If you really need to replace a chart with another one, you should in fact do that: remove the old chart and insert a newly initialized chart.

I am open to a debate about this, but I would need to see a very compelling use case for mutating chart types to make the implementation, maintenance, and cognitive burden worth it.