#44056 closed defect (bug) (fixed)
Fix markup for table of contents on privacy policy guide
Reported by: | ocean90 | Owned by: | azaozz |
---|---|---|---|
Milestone: | 4.9.6 | Priority: | normal |
Severity: | normal | Version: | 5.1 |
Component: | Privacy | Keywords: | gdpr has-patch commit |
Focuses: | ui, accessibility | Cc: |
Description
There are a few issues with current ToC:
- The Introduction link has an empty anchor. It should have a specific one just like the others: https://core.trac.wordpress.org/browser/trunk/src/wp-admin/includes/misc.php?rev=43242&marks=1606#L1606
- Instead of the empty anchor tag the ID can be directly assigned to the headline: https://core.trac.wordpress.org/browser/trunk/src/wp-admin/includes/misc.php?rev=43242&marks=1636#L1636
- The date format should be consistent across the admin, see [35811].
get_option( 'date_format' )
needs to be replaced: https://core.trac.wordpress.org/browser/trunk/src/wp-admin/includes/misc.php?rev=43242&marks=1607#L1607 - The ToC IDs are not guaranteed to be unique on the page. I suggest to prefix them with
policy-<plugin name>
or something else: https://core.trac.wordpress.org/browser/trunk/src/wp-admin/includes/misc.php?rev=43242&marks=1632#L1632
Attachments (2)
Change History (9)
This ticket was mentioned in Slack in #core by desrosj. View the logs.
7 years ago
#4
@
7 years ago
- Keywords commit added
Let's go with 44056.2.patch for now.
As mentioned on Slack, I tried the :target
way but then I remembered that it requires a huge gap between the sections otherwise you wouldn't be able to click the Copy button anymore due to the negativ top margin.
Note: See
TracTickets for help on using
tickets.
In 44056.patch:
We can't add IDs to the headings as they are "too low". Unfortunately the browsers scroll-into-view is still somewhat buggy and doersn't take into account HTML elements that may cover the top. If we add the IDs to the headings or use empty anchors, the actual headings are scrolled under the admin toolbar. Tested in FF, Chrome, Edge and IE11, all do that :(