├── w3c.json ├── LICENSE.md ├── .github ├── ISSUE_TEMPLATE │ └── new-on-tr.md └── workflows │ └── auto-label.yml ├── README.md └── CONTRIBUTING.md /w3c.json: -------------------------------------------------------------------------------- 1 | { 2 | "group": [83907] 3 | , "contacts": ["ruoxiran"] 4 | , "repo-type": "rec-track" 5 | } 6 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | All documents in this Repository are licensed by contributors 2 | under the 3 | [W3C Document License](https://www.w3.org/copyright/document-license/). 4 | 5 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/new-on-tr.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: New on TR 3 | about: FPWD, new to us. 4 | title: '' 5 | labels: FPWD 6 | assignees: '' 7 | 8 | --- 9 | 10 | Name: 11 | status: 12 | WG: 13 | shortname: 14 | URL: 15 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Accessibility review—longitudinal tracking 2 | 3 | This repo is used by the [Accessible Platform Architectures WG](https://www.w3.org/WAI/about/groups/apawg/) to monitor the accessibility of specifications over time. We use the issues threads in this repository to tie together the results from _all_ reviews for a spec, throughout its lifetime. 4 | 5 | Spec review project: https://github.com/orgs/w3c/projects/155/views/1 6 | 7 | This is in contrast to the [a11y-request](https://github.com/w3c/a11y-request) and [a11y-tracking](https://github.com/w3c/a11y-tracking) repos, which are used to request reviews at specific times, and to track the results of those reviews. 8 | 9 | Historical longitudinal spec review can be found in the APA wiki: https://www.w3.org/WAI/APA/wiki/Category:Spec_Review 10 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Accessible Platform Architectures Working Group 2 | 3 | Contributions to this repository are intended to become part of Recommendation-track documents governed by the 4 | [W3C Patent Policy](https://www.w3.org/Consortium/Patent-Policy/) and 5 | [Document License](https://www.w3.org/copyright/document-license/). To make substantive contributions to specifications, you must either participate 6 | in the relevant W3C Working Group or make a non-member patent licensing commitment. 7 | 8 | If you are not the sole contributor to a contribution (pull request), please identify all 9 | contributors in the pull request comment. 10 | 11 | To add a contributor (other than yourself, that's automatic), mark them one per line as follows: 12 | 13 | ``` 14 | +@github_username 15 | ``` 16 | 17 | If you added a contributor by mistake, you can remove them in a comment with: 18 | 19 | ``` 20 | -@github_username 21 | ``` 22 | 23 | If you are making a pull request on behalf of someone else but you had no part in designing the 24 | feature, you can remove yourself with the above syntax. 25 | -------------------------------------------------------------------------------- /.github/workflows/auto-label.yml: -------------------------------------------------------------------------------- 1 | name: Auto Label and Link Related Issues 2 | 3 | on: 4 | issues: 5 | types: [opened] 6 | 7 | jobs: 8 | label-and-link: 9 | runs-on: ubuntu-latest 10 | 11 | steps: 12 | - name: Extract shortname, add label, and link related issues 13 | uses: actions/github-script@v6 14 | with: 15 | script: | 16 | const issueBody = context.payload.issue.body || ""; 17 | const issueNumber = context.payload.issue.number; 18 | const repoOwner = context.repo.owner; 19 | const repoName = context.repo.repo; 20 | 21 | console.log(`Processing issue #${issueNumber} in ${repoOwner}/${repoName}`); 22 | 23 | // 正则匹配 shortname: [value] 或 shortname: value(支持 - / . _ 等字符) 24 | const match = issueBody.match(/shortname:\s*\[?\s*([\w\-.:/]+)\s*\]?/i); 25 | if (!match || !match[1]) { 26 | console.log("No valid shortname found."); 27 | return; 28 | } 29 | 30 | const shortname = match[1].trim(); 31 | const labelName = `s:${shortname}`; 32 | const labelColor = "6bc5c6"; 33 | console.log(`Extracted shortname: ${shortname}, Label: ${labelName}`); 34 | 35 | try { 36 | // 获取现有标签列表,避免重复创建 37 | const existingLabels = await github.rest.issues.listLabelsForRepo({ 38 | owner: repoOwner, 39 | repo: repoName, 40 | }); 41 | 42 | const labelExists = existingLabels.data.some(label => label.name === labelName); 43 | if (!labelExists) { 44 | // 创建新的标签 45 | await github.rest.issues.createLabel({ 46 | owner: repoOwner, 47 | repo: repoName, 48 | name: labelName, 49 | color: labelColor, 50 | description: `Automatically created label for shortname: ${shortname}`, 51 | }); 52 | console.log(`Created label: ${labelName}`); 53 | } else { 54 | console.log(`Label '${labelName}' already exists.`); 55 | } 56 | 57 | // 添加标签到当前 Issue 58 | await github.rest.issues.addLabels({ 59 | owner: repoOwner, 60 | repo: repoName, 61 | issue_number: issueNumber, 62 | labels: [labelName], 63 | }); 64 | console.log(`Added label '${labelName}' to issue #${issueNumber}`); 65 | 66 | // 查找 w3c/a11y-request 仓库中是否有相同标签的 issue 67 | let relatedIssues = []; 68 | let page = 1; 69 | const maxPages = 5; // 最多获取 5 页数据,防止 API 速率受限 70 | 71 | while (page <= maxPages) { 72 | const response = await github.rest.issues.listForRepo({ 73 | owner: "w3c", 74 | repo: "a11y-request", 75 | state: "open", 76 | labels: labelName, 77 | per_page: 50, // 一次最多获取 50 条 78 | page: page, 79 | }); 80 | 81 | if (response.data.length === 0) break; // 无更多 Issue,停止分页 82 | 83 | relatedIssues = relatedIssues.concat(response.data); 84 | console.log(`Fetched ${response.data.length} issues from page ${page}`); 85 | page++; 86 | } 87 | 88 | if (relatedIssues.length > 0) { 89 | // 生成评论内容 90 | const relatedLinks = relatedIssues 91 | .map(issue => `- [#${issue.number}](${issue.html_url}): ${issue.title}`) 92 | .join("\n"); 93 | 94 | const commentBody = `Related issues found in [a11y-request](https://github.com/w3c/a11y-request):\n${relatedLinks}`; 95 | 96 | // 在当前 Issue 下添加评论 97 | await github.rest.issues.createComment({ 98 | owner: repoOwner, 99 | repo: repoName, 100 | issue_number: issueNumber, 101 | body: commentBody, 102 | }); 103 | 104 | console.log(`Added comment linking ${relatedIssues.length} related issues from w3c/a11y-request.`); 105 | } else { 106 | console.log(`No related issues found in w3c/a11y-request.`); 107 | } 108 | } catch (error) { 109 | console.error(`Error: ${error.message}`); 110 | } 111 | 112 | --------------------------------------------------------------------------------