表格标题宽度
我已经获得了一个现有的表格布局(用于表格数据),其任务是使其尽可能易于访问。
我向布局中的每个表格添加了一个标题标签,并且我意识到标题宽度在不同浏览器中不一致。经过对 CSS 的一些尝试和错误之后,我成功地在我需要支持的所有浏览器上得到了正确的结果,除了 Firefox(最后一个版本),其中表格比它们自己的标题大(与 CSS 中声明的宽度相同)
我用谷歌搜索了一下,这似乎是一个已知问题。
对此有什么标准解决方案/建议吗?
提前致谢
I have been given an existing table layout (for tabular data) with the task of making it as accessible as possible.
I added a caption tag to each table within the layout and I realized the caption width is not consistent across different browsers. After a bit of trial and error with CSS, I managed to get it right on all the browsers I need to support aside from Firefox (very last release) where the tables are larger than their own captions (with same width declared in the CSS)
I have googled a bit and this seems to be a known issue.
Any standard solution/suggestion for this?
Thanks in advance
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Mirko
请记住,标题不一定是可见的,它们仍然可以访问,例如,如果您隐藏它们(显示:无或可见性:隐藏),则宽度并不重要,因为它们不会是“在页面中看到”,但是屏幕阅读器仍会拾取它们。
Mirko
Keep in mind that captions don't HAVE to be visible and they still will be accesible, for instance if you hide them (display:none OR visibility:hidden), the width won't matter, as they won't be "seen" in the page, however a screen reader will still pick them up.