Metadata
- Source
- FLUID-4388
- Type
- Improvement
- Priority
- Minor
- Status
- Closed
- Resolution
- Fixed
- Assignee
- N/A
- Reporter
- Harris Wong
- Created
2011-08-05T15:31:59.170-0400 - Updated
2022-04-13T12:37:19.582-0400 - Versions
-
- 1.4
- 1.5
- 2.0
- 3.0
- 4.0
- Fixed Versions
-
- 2.0
- Component
-
- Prefs Framework
- Table of Contents
- UI Options
Description
Steps to reproduce:
1. go to src/webapp/demos/uiOptions/FullPreviewUIOptions/html/uiOptions.html
2. click "Show tables of content", then "save and apply"
3. uncheck "Show tables of content", then "save and apply"
4. Go to the DOM and you will notice there are left over <a> tags before the header elements.
Environments
All
Comments
-
Harris Wong commented
2011-08-05T15:32:31.611-0400 Attached screenshots before and after showing the DOM tree differences.
-
Harris Wong commented
2011-08-05T15:36:49.619-0400 Heidi suggested that the left over code should be cleaned after clicking hide(). Since show() created the anchors, the hide() do the opposite which is to remove. Conversation (Aug 04, 2011) below:
(04:18:27 PM) heidi_: cindyli Justin_o when i turn off table of contents, the hidden anchor links that get added within the content aren't removed
(04:21:38 PM) cindyli: heidi_: seems the turning off just hides the div without removing it. that's probably the expected behavior. am i right, harriswong?
(04:22:44 PM) harriswong: cindyli: i think so. it simply hides the visibility but it's not a remove function.
(04:27:49 PM) heidi_: harriswong but turning it on is an add function, seems like unchecking it should do the opposite/remove ?
(04:30:51 PM) harriswong: heidi_: are the left over anchors affecting anything upon hiding the ToC?
(04:32:19 PM) heidi_: harriswong unused, unnecessary mark up? confusing links to screen readers? not sure how that affects things
(04:32:33 PM) heidi_: just seems a little messy to leave them behind, when they are meaningless
(04:33:36 PM) harriswong: heidi_: Then let's create a jira for it and have them removed. -
Justin Obara commented
2016-07-08T10:41:19.769-0400 According to the HTML5 spec ( http://w3c.github.io/html/browsers.html#navigating-to-a-fragment-identifier ) we don't need to insert the anchors anymore. Instead we should just use ( or add ) ID's to the relevant elements.
-
Justin Obara commented
2022-04-13T12:37:19.447-0400 Resolved with FLUID-6011