Skip to content
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

Admin_Settings: Various accessibility improvements #307

Merged
merged 3 commits into from
Feb 21, 2025

Conversation

costdev
Copy link
Contributor

@costdev costdev commented Feb 21, 2025

Pull Request

What changed?

  • Added aria-describedby to settings elements and a matching id attribute to the .description element.
  • Added the label_for argument to add_settings_field() calls to ensure the field labels are wrapped in the <label> tags.
  • Changed Clear Log and View Log from a elements to button elements with type="button" so they don't trigger a form submit.

Why did it change?

  • To reduce accessibility errors.
  • To be more consistent with other settings pages in WordPress.
  • Note: There are still 3 errors.
    • An error due to api_host_other not having a label.
    • A contrast error for the transparent text in the "Generate API Key" button
    • A contrast error for Voltron.

Did you fix any specific issues?

Fixes #299

CERTIFICATION

By opening this pull request, I do agree to abide by the Code of Conduct and be bound by the terms of the Contribution Guidelines in effect on the date and time of my contribution as proven by the revision information in GitHub.

@costdev costdev force-pushed the accessibility_fixes branch from 2381cb2 to bd3aa68 Compare February 21, 2025 13:39
@costdev costdev marked this pull request as ready for review February 21, 2025 13:44
@costdev costdev requested a review from namithj February 21, 2025 13:44
@costdev costdev merged commit a6a8ed0 into aspirepress:main Feb 21, 2025
6 checks passed
@costdev costdev deleted the accessibility_fixes branch February 21, 2025 13:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[a11y] Admin Settings aren't described by their descriptions.
2 participants