[wp-trac] [WordPress Trac] #43435: Add settings screen for creating a privacy policy
WordPress Trac
noreply at wordpress.org
Sat Mar 10 12:50:47 UTC 2018
#43435: Add settings screen for creating a privacy policy
----------------------------+------------------
Reporter: azaozz | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: 5.0
Component: General | Version:
Severity: normal | Resolution:
Keywords: gdpr has-patch | Focuses:
----------------------------+------------------
Comment (by afercia):
Noticed a few things that could be improved, see [attachment:43435.5.diff]
1
The label for the select is empty, there's no text. As per the
[https://make.wordpress.org/core/handbook/best-practices/coding-standards
/accessibility-coding-standards/#labeling Accessibility coding standards],
please always use explicitly associated labels (for/id attributes), avoid
wrapping labels, never do both.
A visible label always helps because it's clickable. I'd propose to just
follow the existing pattern and change the text in the left cell to a
label. Also, I'm not sure a fieldset with a legend helps that much in this
case. Fieldsets are meant to be used to group a set of related form
controls. In this case there's just one select. I'd propose to simplify
and remove them.
2
`add_settings_error()` doesn't support a type `warning`: this is used to
output CSS classes and the notice misses the left border (see screenshot
below).
[[Image(https://cldup.com/cLoEWgBsjZ.png)]]
Either the CSS should account for `.notice.warning` to display an orange
border and the `add_settings_error()` documentation should be updated, or
just use an error. After all, if the currently selected page doesn't
exist, that's an error. The patch changes `warning` to `error`.
3
Moved `Edit or view your privacy policy.` out from the table: it shouldn't
be a table header (`<th>`). I'd suggest to use a simple paragraph or a
notice-info. For consistency, I've opted for the notice (see screenshot
below). Can be changed to a simple paragraph if the notice doesn't feel so
appropriate to y'all.
[[Image(https://cldup.com/6yXkPcaljN.png)]]
4
The two submit buttons have the same ID: IDs should be unique. Passed
additional parameters to `submit_button()` to fix it. Note: same happens
for `id="_wpnonce"` but I guess this can't be changed.
5
Removed the `class="title"` from the H2 as it seems to me it doesn't do
anything.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/43435#comment:30>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list