Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .Jules/palette.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,7 @@
## 2025-05-20 - [Accessible Streamlit Inputs]
**Learning:** Streamlit `text_input` fields with empty strings for labels (`""`) are inaccessible to screen readers as they lack a programmatic label.
**Action:** Use `label_visibility="collapsed"` with a descriptive label string instead of an empty label to maintain visual design while ensuring accessibility.

## 2025-05-21 - [Image Accessibility]
**Learning:** Images embedded via raw HTML in Streamlit (using `st.markdown`) often lack `alt` attributes, making them inaccessible to screen readers.
**Action:** Always add `alt` attributes to `<img>` tags in raw HTML, using empty strings (`alt=""`) for decorative images and descriptive text for informative ones.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
__pycache__/
*.pyc
.venv/
.pytest_cache/
.DS_Store
Binary file modified __pycache__/nasa_data.cpython-312.pyc
Binary file not shown.
Binary file modified __pycache__/test_api_status.cpython-312-pytest-9.0.2.pyc
Binary file not shown.
Binary file modified __pycache__/test_nasa_data.cpython-312-pytest-9.0.2.pyc
Binary file not shown.
4 changes: 2 additions & 2 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@
# Add topography decoration
st.markdown("""
<div style="position: absolute; top: 0; right: 0; width: 45%; min-width: 400px; height: 300px; z-index: 1; overflow: visible; pointer-events: none;">
<img src="data:image/png;base64,{topo_base64}" style="width: 100%; height: 100%; object-fit: cover; object-position: top right;">
<img src="data:image/png;base64,{topo_base64}" alt="" style="width: 100%; height: 100%; object-fit: cover; object-position: top right;">
</div>
""".format(topo_base64=b64encode(open("assets/topography.png", "rb").read()).decode()), unsafe_allow_html=True)

Expand Down Expand Up @@ -559,7 +559,7 @@
st.markdown(f"""
<div style="display: flex; justify-content: center; align-items: center; margin: 0 auto; width: 100%;">
<div style="display: flex; align-items: center; justify-content: center;">
<img src="data:image/png;base64,{avatar_base64}" width="150"
<img src="data:image/png;base64,{avatar_base64}" alt="CeCe Avatar" width="150"
style="border-radius: 50%; margin-right: 20px;">
<span class="gradient-text" style="font-size: 32px; font-weight: bold; white-space: nowrap;">
CECE: YOUR CLIMATE & WEATHER AGENT
Expand Down
2 changes: 1 addition & 1 deletion satellite_homepage.py
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ def create_satellite_homepage():
# Build a mock screenshot of the main interface elements
preview_logo = ""
if logo_base64:
preview_logo = f'<img src="data:image/png;base64,{logo_base64}" width="60" style="border-radius: 50%; margin-right: 12px;">'
preview_logo = f'<img src="data:image/png;base64,{logo_base64}" alt="Climate Copilot Logo" width="60" style="border-radius: 50%; margin-right: 12px;">'

st.markdown(f"""
<div style="position: relative; max-width: 900px; margin: 0 auto 40px auto;">
Expand Down