18

I am referring to this edit of a question of mine. Basically, all heading markup was removed and some were replaced by bold (**).

Despite being just a cosmetic change, I was wondering what the reasoning may have been and whether there is a style guide which tells us to avoid headings altogether? I personally think that a heading has its merits (especially thinking of screen readers) and just using bold for marking something which is indeed a heading is a bad choice.

I agree that some headings could be seen as redundant, but removing all of them – and especially using just bold for something that even the editor must have seen as a heading – seems wrong to me.

I see related questions here and here, but I would be really curious to know what the gold standard is.

4
  • 8
    Just rollback. There is no reason to make that edit except personal style preference. Commented Mar 14, 2024 at 8:22
  • 5
    Related: How do I write an accessible Stack Exchange post? Commented Mar 14, 2024 at 10:08
  • 4
    A comment should probably be left for that editor, linking to this meta post, so that they are aware of the fact that their edits are causing harm (for visually impaired users). Commented Mar 14, 2024 at 12:48
  • 2
    As an aside, inline code formatting is not for terms like "pythonistas" or "pythonic". Commented Mar 14, 2024 at 22:08

2 Answers 2

25

Heading markup makes a post more accessible for users and visitors who use screen readers. Therefore, the use of semantically correct headings is preferred over any other mechanism.

It looks like the headings are correct and, as such, replacing them with bold might have the same visual appearance for sighted users, but the meaning of those headings would change for our visually challenged users.

You should rollback that edit and flag for a moderator if it gets re-applied again.

Reviewers who find such edits in the suggested-edit review queue should reject those edits.

Proper, semantically correct, use of heading markup is the gold standard, not only on Stack Exchange sites but also across the web: Web Accessibility Initiative - Headings

4
  • 4
    Also worth to go over the editor edits history and if many such bad edits flag for mod attention anyway, even if your own post is "safe" - as a measure to protect future victims. Commented Mar 14, 2024 at 13:10
  • 2
    @ShadowWizardLoveZelda you know very well I oppose any witch hunt but I can't control y'all ... Commented Mar 14, 2024 at 13:14
  • 2
    Hardly a witch hunt, more like preventing abuse of a privilege. (In that specific case the editor's history is fine, checked some random edits.) Commented Mar 14, 2024 at 14:01
  • 2
    I agree that replacing the headings with bold text made things worse. However, reverting the change is nowhere near adequate to fix the question properly. Commented Mar 14, 2024 at 22:06
-5

Questions should not use headings, because they should not be long enough for headings to be useful. In particular, you should take care not to conflate a debugging question with a how-to question. If you want to know how to do something, then we don't need a MRE of failed attempts or solutions to simpler problems etc. We need, instead, a clear specification of what the code should do.

In your case, for example, instead of showing dozens of lines of "setup" SQL, just show a table (using table markup) with example data that is minimally complex for a demonstration of what the code needs to do, and then another table showing the exact desired corresponding output. Use brief prose in between to explain what each table represents.

Please consider for a moment what your question looks like if we take out the tables and code:

Problem Description I have a table (#tmstmp) with 2 columns dt (DATETIME) and payload (INT). Eventually I want to sum payload for each 5 minute interval there is. Code Setup Non overlapping timeslots are easy Ultimate Goal: get running timeslots I want, however, to have an entry for each interval in the range, that is from 12:00-12:05, 12:01-12:06, 12:02-12:07 etc. until the last timeslot. I can construct the limits in the whole range before and use that in a JOIN like this: While this works in this toy example I have hundreds of thousands of timestamps in my real data and worst of all I little impact on the indices. My gut feeling tells me that I will create quite some duplication with my inequality JOIN and I was wondering whether this is anyways the canonical way of doing it or whether there is a more SQL-onic way of doing it? (like the pythonistas like to call certain code pythonic if it uses the language inherent concepts rather than trying to solve it with general tools). 

That is 9 lines (in the sense of being newline-delimited), of which 5 are headings. Three of those headings don't even have any prose underneath them. That's... really excessive.

Further, the outline doesn't help understand the problem. Saying that the goal is to get running timeslots would be better accomplished, for example, by just saying that in the prose. (Incidentally, I don't think you mean running timeslots, but rather overlapping timeslots - you want to collect results from a "sliding window" or "rolling window" of timestamps.)

And then, the code shown here doesn't really help explain the problem. If you really need the question to be specific to this exact schema - rather than it just being one minimal, example schema that is useful for demonstrating the tool or technique you're asking about - then you're not asking a question suitable for Stack Overflow; you're asking someone to write code for you. On the other hand, showing that you can solve a simpler problem doesn't really help explain how the more complex problem differs; and this is already evident from a proper specification. Showing your attempt at the more complex problem is only relevant if you are specifically asking about optimizing that approach, rather than accepting any new approaches (and in this case the question almost certainly Needs More Focus, as you have neither verified that there is a performance issue nor attempted to isolate an underlying cause.)

Making the important parts of the prose stand out, or highlighting the structure, is better accomplished by not having as much stuff in between to space it out. (And yes, the fact that I begin and end this answer with a short bit of bold text, is very much intentional. You are meant to reflect on this like a Zen koan.)

1
  • 1
    I genuinely don't understand why people disagree with me about this. Commented Aug 24, 2024 at 17:03

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.