-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Replace <em> with <span> for desc_annotation semantic HTML #13689
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace <em> with <span> for desc_annotation semantic HTML #13689
Conversation
Replace <em class="property"> with <span class="property"> in HTML5 writer's visit_desc_annotation and depart_desc_annotation methods to improve semantic HTML structure for Python attribute type annotations. Fixes sphinx-doc#13688 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
0288b94
to
bba4f3d
Compare
Hi @q2mark this commit has the author of "Claude". Please confirm that this PR is entirely comprised of your own work, and you posses the legal right to copyright. A |
@AA-Turner yes this is entirely my own work and I have the right to copyright. |
Oh, please also add yourself to AUTHORS. |
Done. |
# Conflicts: # CHANGES.rst
Thanks! A |
Purpose
This PR replaces
<em class="property">
with<span class="property">
in the HTML5 writer'svisit_desc_annotation
anddepart_desc_annotation
methods to improve semantic HTML structure for Python attribute type annotations.Changes:
sphinx/writers/html5.py
to use<span>
instead of<em>
tags while maintaining the existingproperty
CSS classtests/test_domains/test_domain_py_pyobject.py
Benefits:
The change maintains all existing functionality and CSS styling while providing better semantic meaning.
References