Default error pages get the session's lang on English text
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 82/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- html, java
调研方向
这四个页面位于 markup.html pages 包中(PageExpiredErrorPage、AccessDeniedPage、InternalErrorPage、ExceptionErrorPage),并且都继承 WebPage。先阅读 WebPage#onHtmlTag,确认标记中的 lang 优先于会话 locale 并抑制 dir,然后在每个页面的 <html> 标签中添加 lang="en",并将 HTML 4.01 Transitional doctype 替换为 <!DOCTYPE html>。完成意味着即使会话 locale 是 nl-NL 或 RTL,每个页面也渲染带有 lang="en" 且没有 dir 的英文文本;查看现有的页面标记测试,了解渲染出的标签是如何断言的。
由索引模型根据 Issue 内容生成。
描述
Since #1870, every WebPage gets lang and dir on its <html> tag from the page locale. Wicket's default error pages extend WebPage, but their text is hard-coded English and they have no resource bundles:
PageExpiredErrorPageAccessDeniedPageInternalErrorPageExceptionErrorPage
A user whose session locale is nl-NL now gets <html lang="nl-NL" dir="ltr"> on a page that reads "Page Expired". Before #1870, lang was missing. Now it is wrong: screen readers read the English text with Dutch pronunciation, which fails WCAG 2.2 SC 3.1.1 (Language of Page, level A). A user with an RTL locale also gets dir="rtl" on English text.
The pages also still use the HTML 4.01 Transitional doctype.
Possible fix: put lang="en" on the <html> tag of these four pages. A markup lang takes precedence in WebPage#onHtmlTag and also suppresses dir. Replace the doctype with <!DOCTYPE html> at the same time. Translating the pages through resource bundles and dropping the markup lang would be the alternative, but contributed translations for them don't exist yet.
The accessibility chapter of the user guide (#1847) recommends replacing these pages with application pages and mentions this behaviour.
- 主要语言
- Java
- 星标
- 800
- 派生
- 423
- 平均合并
- 1 天 1 小时
- 30 天内合并 PR
- 170
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
apache/wicket 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 70/100
维护者通常 1 天内回复
-
Fix dark-mode table headers and phone-width overflow in the reference guide's CSS可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
Document and enforce pull request review guidelines可能已有人在做 @dashorst 于 7 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复
-
COOP and COEP exemptions compare with the context path, so page exemptions never match可能已有人在做 @asvanberg 于 25 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 67/100
apache/wicket#1661 · 1 条评论 · 1 个 reaction ·
维护者通常 1 天内回复
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 65/100
NationalSecurityAgency/ghidra#10220 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 80/100
维护者通常 1 天内回复
-
RIS export splits an organization name containing “and” into multiple authors可能已有人在做 @Gautam-aman 今天认领。 未关闭status: needs-triage
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
FailureContext.java rounds down thresholds in lastedAtLeast()可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 86/100
维护者通常 1 天内回复