https://bugzilla.wikimedia.org/show_bug.cgi?id=31932

Krinkle <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]
   Target Milestone|Future release              |---

--- Comment #5 from Krinkle <[email protected]> 2012-06-03 14:57:28 UTC ---
Tim, Danny and I discussed this today at the Berlin Hackathon:

- Current HTML:

<h#(wikitext attribs)>
  (edit section link)
  <span class="mw-headline" id="(anchor based on heading title)">(heading
title)</span>
</h#>


- Use cases:

1) Ability to jump to the headline from the hashtag. When the skin has a large
edit section link or positioned it as a block
2) Ability to style the currently hash-targetted heading with CSS ":target"
3) For screen readers and semantics, the edit section link should not be part
of the <h#>.


- Conclusions:

* We can't put the ID on the <h#>, because wikitext pages can (and do!) contain
html tags with an ID already (e.g. <h3 id="awesome">The Awesome Delivery of
Resources</h3>). See Linker::makeHeadline

* We shouldn't put an empty <span id="..></span> (or div) _before_ the <h#>.
Although that solves the jump issue, it still doesn't allow to easily select
the header from the :target selector.

* We can't put a span around the <h#>. Block element should not be in an inline
element.

* We *can* put an unstyled <div> around (not before) the <h#>. That solves all
three use cases. CSS styling is possible with ":target h# { .. };". Also we
should then add the "mw-headline" class to the <h#>. Potentially it can have a
class already, but an element can have multiple classes. Note that in this case
the attributes have to be merged. With code 'class="y" title="z"  class="x"'
the last one overrides the earlier.

- Proposed HTML:

<div id="(anchor based on heading title)">
  (edit section link)
<h#(wikitext attribs) class="mw-headline">
  (heading title)
</h#>
</div>

- Proposed HTML (alternative):

<div class="mw-headline" id="(anchor based on heading title)">
  (edit section link)
<h#(wikitext attribs)>
  (heading title)
</h#>
</div>

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to