Skip to content

Commit

Permalink
Add more ARIA global properties
Browse files Browse the repository at this point in the history
  • Loading branch information
torusrxxx committed Dec 12, 2024
1 parent e470b94 commit 89aa4ec
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/freenet/client/filter/HTMLFilter.java
Original file line number Diff line number Diff line change
Expand Up @@ -2120,7 +2120,11 @@ static class TagVerifier {

TagVerifier(String tag, String[] allowedAttrs, String[] uriAttrs, String[] inlineURIAttrs, String[] booleanAttrs) {
this.tag = tag;
this.allowedAttrs = new HashSet<String>();
this.allowedAttrs = new HashSet<String>(Arrays.asList("aria-braillelabel", "aria-brailleroledescription",
"aria-describedby", "aria-description", "aria-details", "aria-disabled", "aria-errormessage",
"aria-expanded", "aria-flowto","aria-hidden","aria-invalid","aria-label","aria-labelledby","aria-level",
"aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-required",
"aria-roledescription","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext"));
this.parsedAttrs = new HashSet<String>();
if (allowedAttrs != null) {
for (String allowedAttr: allowedAttrs)
Expand Down
2 changes: 1 addition & 1 deletion test/freenet/client/filter/ContentFilterTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ public void testLowerCaseExtensions() {
}
}

private static final String ARIA_ROLE_TEST = "<span role=\"caption\" />";
private static final String ARIA_ROLE_TEST = "<span role=\"caption\" aria-label=\"caption\"/>";

@Test
public void testARIAProperties() throws Exception {
Expand Down

0 comments on commit 89aa4ec

Please sign in to comment.