Repository navigation
Fix the permission trace, tab contrast, touch targets, labels and no-JS forms - #17
Merged
Merged
Conversation
- Inactive Knowledge Base tabs use the board's dark text colour, which passes WCAG AA on prosilver's tab colour (it was 3.7:1). - Article title links and the queue's buttons and menus are at least 24px high (WCAG 2.2, 2.5.8). - The post-as, also-list-in and Markdown fields on the posting form and the ACP field type menu had two labels each; the wrapping one is gone. - The ACP introduction settings are in the page from the start and the script hides them while the introduction is off, so they work without JavaScript. The custom-field filter and the drafts-only box get a Go button when JavaScript is off. - .gitignore is left out of release archives. - tests/browser/kb_form_access.js checks all of this on a seeded board. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- build_auth_option_statement() put a single permission name, taken from the trace page's address, into SQL without quotes, so a crafted link opened by an administrator could run SQL. It is now quoted, as in phpBB's own version, and the LIKE branch has its missing space. - The group and user queries joined the id condition to the next AND without a space, so the trace never opened. - KB_TRACE_GROUP_NEVER_TOTAL_NEVER and its _LOCAL form were missing. - New unit test for the option filter; the page sweep now opens the permission trace. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
|
Pushed 8217f5e, which fixes the ACP permission trace:
New The PR description is updated to match. Investigated and written by Claude on behalf of William Jacoby (bonelifer). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-ups from the maintenance pass (#16): tab contrast, touch targets, doubled labels, forms that needed JavaScript, and an SQL injection and two missing strings in the ACP permission trace.
Accessibility
#536482) on its tab colour (#BACCD9), 3.7:1 for small bold text that needs 4.5:1. They now use the board's dark text colour (#28313F), about 8.8:1. A style with dark tabs can change it in an alternative stylesheet.Without JavaScript
onClickmoved intoacp_knowledgebase.js.Packaging:
.gitignoreis left out of release archives.ACP permission trace
build_auth_option_statement()put a single permission name into SQL without quotes, unlike phpBB's own version of the function. The name comes from the trace page's address (auth=), so a crafted link opened by an administrator could run SQL of its choosing. It's now a quoted string, and theLIKEbranch has the space it was missing beforeLIKE.IN (...)anduser_id = Nstraight into the nextAND(2AND), so every trace stopped on an SQL error.KB_TRACE_GROUP_NEVER_TOTAL_NEVERand its_LOCALform, shown when a group is set to NEVER and the total is already NEVER, are added in phpBB's own wording. A validation report from Chico Gois's Workspace tool flagged them; testing that fix uncovered the two bugs above.Tests
New
tests/browser/kb_form_access.jschecks all of the above on a seeded board, as the administrator, with and without JavaScript. On the code before this change, 7 of its 9 checks fail; the 2 that pass check that the introduction settings still follow the switch with JavaScript on.New
tests/kb_acp_auth_option_statement_test.phpruns the option filter against a SQLite table with a single name, a name with SQL in it, aLIKEpattern and a list; three of its four tests fail on the old code.tests/browser/kb_page_sweep.jsnow also opens the permission trace, which fails with an SQL error on the old code.Claude ran:
kb_form_access.jsandkb_page_sweep.json fresh seed-forum SQLite boards for phpBB 3.3.19 and 4.0.0-a3-dev: 9 of 9 checks and 27 of 27 pages on both. With two of the administrator's groups set to NEVER, the trace shows every row in words; without the new strings it showed the raw key.page_a11y.pyon the index, a category, an article, the posting form, the queue, Manage Your Articles and Recent changes. The tab contrast, touch-target and doubled-label findings are gone. What's left is prosilver's own markup.template_a11y.py: clean.Not changed: the link boxes on an article page use prosilver's code colour, which axe also flags. Code in forum posts uses the same colour, so it isn't specific to the Knowledge Base.
Investigated and written by Claude on behalf of William Jacoby (bonelifer).
🤖 Generated with Claude Code