Page 1 of 1

prosilver: <dfn> tags in forumlist_body.html

Posted: Mon Aug 13, 2018 9:28 am
by Gingko
Hello.

I am trying to make a theme that inherits from prosilver, but there is something that I don't understand in this style.

In the forumlist_body.html template file, there are three <dfn> elements (inside the Topics, Posts and Last post <dd> cells) whose contents replicate the title of the columns.

These elements are styled that way (from contents.css, line 78) :

Code: Select all

ul.topiclist dfn {
    position: absolute;
    left: -999px;
    width: 990px;
}
… thus absolutely positioned relatively to the grand-parent <dl> element.
This styling actually seems to put them outside of the view port, which is not very different from applying a display:none to them.

But this pose a big problem to me, because I need to add a position: relative to the parent (intermediary) <dd> element, and this completely breaks this absolute positioning, making the <dfn> contents visible at an unexpected place.

Of course I need to imagine some styling changes to set to these <dfn> elements, but the problem is that I absolutely don't understand the actual purpose of them, nor why they have been put there, nor why they actually even exist.

When are these <dfn> contents actually and ever displayed?
What are they made for?
Is there some javascript code or responsive style applied to them sometimes?
What will happen if I remove them or if I apply a display:none style to them instead? What will stop working if I do that?

Re: prosilver: <dfn> tags in forumlist_body.html

Posted: Mon Aug 13, 2018 1:56 pm
by Lumpy Burgertushie
try it and see what happens.


rob ert

Re: prosilver: <dfn> tags in forumlist_body.html

Posted: Mon Aug 13, 2018 2:36 pm
by Gingko
Lumpy Burgertushie wrote:
Mon Aug 13, 2018 1:56 pm
try it and see what happens.
I already tried, it works as expected for what I want to do, but this doesn't help me.

As I don't know which feature it was implementing, I don't know which feature may have stopped working afterward.

Re: prosilver: <dfn> tags in forumlist_body.html

Posted: Mon Aug 13, 2018 7:59 pm
by Hanakin
The dfn elements are left over archaic code for handling screen readers change them to spans and give them the class of sr-only instead and that should fix everything for you

Re: prosilver: <dfn> tags in forumlist_body.html

Posted: Tue Aug 14, 2018 2:27 pm
by Gingko
Ok, thank you very much.
Maybe I try to install a screen reader, one of these days, in order to check this feature. ;)