File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11/* ═══════════════════════════════════════════════════════════════
2- main.js — App wiring for Premium Python Projects Gallery
2+ main.js — App wiring for Premium Python Projects Gallery
33 ═══════════════════════════════════════════════════════════════ */
44
55import { updateProjectVisibility } from "./modules/utils.js" ;
@@ -911,10 +911,18 @@ document.addEventListener("DOMContentLoaded", function () {
911911 var iconBox = document . createElement ( "div" ) ;
912912 iconBox . className = "dropdown-item-icon" ;
913913 var banner = project . card . querySelector ( ".card-banner" ) ;
914+ projectCards . forEach ( function ( card ) {
915+ var banner = card . querySelector ( ".card-banner" ) ;
916+ var title = card . querySelector ( "h3" ) ;
917+
918+ if ( banner && title ) {
919+ banner . alt = title . textContent . trim ( ) + " project preview" ;
920+ }
921+ } ) ;
914922 if ( banner ) {
915923 var img = document . createElement ( "img" ) ;
916924 img . src = banner . src ;
917- img . alt = " ";
925+ img . alt = project . title + " project preview ";
918926 iconBox . appendChild ( img ) ;
919927 }
920928
You can’t perform that action at this time.
0 commit comments