-
Notifications
You must be signed in to change notification settings - Fork 624
Add alt text check workflow #11268
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Add alt text check workflow #11268
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| name: "Alt text check" | ||
|
|
||
| on: | ||
| pull_request: | ||
|
|
||
| jobs: | ||
| alt-text: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Find markdown images with empty alt text | ||
| run: | | ||
| set -euo pipefail | ||
| echo "Checking Markdown image alt text..." | ||
| # Find markdown images with empty alt:  or  | ||
| md_empty_alt=$(git grep -n -E "!\[\s*\]\([^)]*\)" -- 'en/**/*.md' || true) | ||
| # Find HTML <img> tags missing an alt attribute | ||
| html_missing_alt=$(git grep -n -P "<img\b(?![^>]*\balt=)[^>]*>" -- 'en/**/*.md' || true) | ||
| if [ -n "$md_empty_alt" ] || [ -n "$html_missing_alt" ]; then | ||
| echo "Found images missing alt text:" >&2 | ||
| echo "$md_empty_alt" >&2 | ||
| echo "$html_missing_alt" >&2 | ||
| exit 1 | ||
| fi | ||
| echo "All images have alt text (as far as this check can detect)." | ||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -21,7 +21,7 @@ below scopes chart to define scopes. | |||||
| 1. Sign in to WSO2 the Admin portal ( `https://<Server Host>:9443+<port offset>/admin` ) as the super admin or tenant admin | ||||||
| 2. Click `Scope Assignments` in the left sidebar and click on `Add scope mappings` . | ||||||
| 3. In the `Provide role name` text input give the role name which was previously created in step 1 and then click `next`. | ||||||
| 4. In the `Select Permissions` menu, select the `Custom scope assignments` option. And select the scopes that you want to assign for the newly created role. You can refer the following table when assigning the scopes. For example, If the admin wants the newly created user to access the key managers settings in the admin portal he can assign `apim:keymanagers_manage`, `apim:tenantInfo`, and `apim:admin_settings`. | ||||||
| 4. In the `Select Permissions` menu, select the `Custom scope assignments` option. And select the scopes that you want to assign for the newly created role. You can refer to the following table when assigning the scopes. For example, If the admin wants the newly created user to access the key managers settings in the admin portal he can assign `apim:keymanagers_manage`, `apim:tenantInfo`, and `apim:admin_settings`. | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Tighten wording for readability in this instruction step. This sentence is grammatically awkward in two places ( Suggested rewrite-4. In the `Select Permissions` menu, select the `Custom scope assignments` option. And select the scopes that you want to assign for the newly created role. You can refer to the following table when assigning the scopes. For example, If the admin wants the newly created user to access the key managers settings in the admin portal he can assign `apim:keymanagers_manage`, `apim:tenantInfo`, and `apim:admin_settings`.
+4. In the `Select Permissions` menu, select `Custom scope assignments`, then choose the scopes to assign to the newly created role. Refer to the following table when assigning scopes. For example, if the admin wants the newly created user to access Key Manager settings in the Admin Portal, assign `apim:keymanagers_manage`, `apim:tenantInfo`, and `apim:admin_settings`.📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||
|
|
||||||
| []({{base_path}}/assets/img/administer/add-admin-scope-mapping-role-based-access.png) | ||||||
|
|
||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,7 +4,7 @@ | |
|
|
||
| The Control Plane serves as the central intelligence hub for WSO2 Kubernetes Gateway, orchestrating the entirety of the API ecosystem. It encompasses critical functionalities such as API management, administrative operations, and the API marketplace. Structurally, it comprises four principal components: the Back Office, Dev Portal, Admin Portal, and APIM-APK Agent. These components cater to diverse user roles, ranging from API product managers to consumers and administrative personnel. Within the Control Plane, users configure, oversee, and track the performance of APIs, ensuring seamless management and optimization of the API landscape. | ||
|
|
||
| For the Kubernetes Gateway Control Plane, we are going to use same WSO2 API Control Plane. The WSO2 API control plane is a set of components that are responsible for managing and monitoring APIs. | ||
| For the Kubernetes Gateway Control Plane, we are going to use the same WSO2 API Control Plane. The WSO2 API control plane is a set of components that are responsible for managing and monitoring APIs. | ||
| Kubernetes Gateway only supports REST API and GraphQL API creation for now. | ||
|
|
||
| ## Architecture | ||
|
|
@@ -32,4 +32,4 @@ The APIM APK Agent is a component that connects the WSO2 API Control Plane with | |
|
|
||
| ## Next Steps | ||
|
|
||
| You can refer the [Quick Start Guide](https://apk.docs.wso2.com/en/latest/get-started/quick-start-guide-with-cp/) with regards to trying out API Control Plane with Kubernetes Gateway using APIM-APK Agent. | ||
| You can refer to the [Quick Start Guide](https://apk.docs.wso2.com/en/latest/get-started/quick-start-guide-with-cp/) with regards to trying out API Control Plane with Kubernetes Gateway using APIM-APK Agent. | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Use “with regard to” (or simplify phrasing) for grammatical correctness.
🤖 Prompt for AI Agents |
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: wso2/docs-apim
Length of output: 195
🏁 Script executed:
cat -n .github/workflows/alt-text-check.yml | head -30Repository: wso2/docs-apim
Length of output: 1148
🏁 Script executed:
Repository: wso2/docs-apim
Length of output: 157
🏁 Script executed:
Repository: wso2/docs-apim
Length of output: 221
Tighten
<img>regex to avoid false negatives.The current pattern on line 18 misses two cases: HTML
<img>tags in uppercase (e.g.,<IMG>) due to case-sensitive matching, and attributes likedata-alt=are incorrectly accepted as validalt=attributes due to word-boundary matching.Proposed fix
The updated pattern uses
(?i)for case-insensitive matching and\salt\s*=to require whitespace boundaries aroundalt=, preventing matches againstdata-alt=or similar attributes.📝 Committable suggestion
🤖 Prompt for AI Agents