简体   繁体   English

如何更改 Tableau 仪表板中的 Tab 焦点顺序以确保符合辅助功能指南?

[英]How to change Tab Focus order in Tableau Dashboards to ensure compliance with Accessibility Guidelines?

Tableau dashboards need to follow accessibility guidelines. Tableau 仪表板需要遵循辅助功能准则。 Fixing the 'Tab' focus order is one of the main challenges that most Tableau developers face while ensuring that the focus order is set in the desired left to right, top to bottom format.修复“Tab”焦点顺序是大多数 Tableau 开发人员在确保焦点顺序设置为所需的从左到右、从上到下格式时面临的主要挑战之一。 However, most of the time the focus order moves in the order in which the elements were added on Tableau dashboards creating a need to manually fix the issue as described here .但是,大多数情况下,焦点顺序按照元素在 Tableau 仪表板上的添加顺序移动,因此需要手动修复问题,如此所述。

How do we automate the same?我们如何实现自动化?

Approach方法

  1. Read the '.twb' file into Jupyter notebook using parse function of xml.etree.ElementTree library.使用 xml.etree.ElementTree 库的解析 function 将“.twb”文件读入 Jupyter notebook。
  2. Find the root node & retrieve all the zone tags present in the.twb file using the same.找到根节点并使用相同的方法检索 .twb 文件中存在的所有区域标记。
  3. Save the total occurrences of ids present in the.twb file.保存 .twb 文件中存在的 id 的总出现次数。 This will help in understanding how many consecutive ids numbers need to be created.这将有助于理解需要创建多少个连续的 ID 编号。
  4. Replace the existing ids with consecutive id number using loop.使用循环将现有 ID 替换为连续的 ID 号。

For the step by step code, please refer to my Github Repository here有关分步代码,请参阅我的Github存储库

This Python code will help you to update the zone tag ids automatically without having to use manual effort.此 Python 代码将帮助您自动更新区域标签 ID,而无需使用手动操作。 Thanks to Kelly Gupton for sharing the 'Dashboard Focus Order.twb' (here) using which I have been able to test the code.感谢 Kelly Gupton 分享“Dashboard Focus Order.twb” (此处) ,我可以使用它来测试代码。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM