Advertisement
More mortgages tied to lower-income Americans became 90 or more days past due. See where rates are rising
Mortgage rates are the interest you pay to borrow money for *** home. Higher rates mean higher monthly payments because of accrued interest, which costs you more over the life of *** loan. The Federal Reserve set short-term interest rates, which influence how much you owe for things like credit cards and car loans. But according to experts, mortgage rates do not follow the Fed. Instead they follow the 10-year Treasury, which has to do with US government bonds. Right now, the bond market is nervous about inflation. So even with the Fed’s recent Rate cut in December, mortgage rates didn’t budge. Our get the Facts data team dug into the numbers to show us how mortgages have changed over the last decade. Rates remain high, hovering an average of 6% this year, the lowest rates have been in the last decade and came during the COVID pandemic when they bottomed out at 2.65% in January of 2021. But mortgage rates have hovered around 3 to 4% until the start of 2022 when they surpassed 5% and haven’t dropped. Below 6% since September 2022, and these high rates can be painful when buying *** home. Our get the facts data team found the most expensive mortgages were in places like Santa Clara, San Mateo, and Marin Counties, all in California. But Nantucket County in Massachusetts tops the list, with mortgages averaging nearly $10,000 in 2025. The least expensive are mostly in the South or Midwest, like Todd County, South Dakota or Stewart County, Georgia. Where an average mortgage is over $300. If you’re trying to buy *** home, experts tell our data team there are 3 barriers right now, those high mortgage rates, high home prices, and buyers just not wanting to buy *** house right now due to other levels of uncertainty. If you’re curious with how your monthly mortgage rate has changed, our get the Facts data team created *** tool on our website. You just plug in your county, and it calculates how much more or less you’re paying compared to 10 years ago. Reporting in Washington, I’m Amy Lou.
Advertisement
More mortgages tied to lower-income Americans became 90 or more days past due. See where rates are rising
Updated: 12:59 PM EDT Mar 12, 2026
Mortgages entering serious delinquency are returning to levels seen a decade ago, with lower-income homeowners experiencing the highest delinquency rates, according to data from the Federal Reserve Bank of New York.”Overall, mortgages continue to perform well by historical standards and have risen recently only after having reached artificially low levels during the pandemic,” the FRBNY wrote in its report.The FRBNY provides a snapshot of trends in household borrowing and indebtedness across mortgages, student loans, credit cards and other loans every three months. From October to December, about 1.4% of mortgages became 90 or more days past due. Americans earning less than $58,000 had the highest delinquency rate among all income groups, with 3% of mortgages transitioning to serious delinquency. Homeowners making more than $101,000, the highest income group, had the lowest mortgage delinquency rate at 0.7%.The last time delinquency rates were this high was at the beginning of 2016. But mortgages entering serious delinquency had been trending downward, reaching a low in 2022 across all income groups. After 2022, delinquency has steadily increased. The age group with the highest percentage of mortgages entering serious delinquency is adults ages 30 to 39, with 1.6% of mortgages shifting to serious delinquency at the end of 2025. Homeowners over the age of 60 had the lowest delinquency rate at 1%. All other age groups were at 1.5%. Compared to other loan types, mortgages had lower delinquency rates than student loans and credit cards. At the end of 2025, 7% of credit card balances transitioned to serious delinquency. Student loans, on the other hand, had 16%. PHNjcmlwdCB0eXBlPSJ0ZXh0L2phdmFzY3JpcHQiPiFmdW5jdGlvbigpeyJ1c2Ugc3RyaWN0Ijt3aW5kb3cuYWRkRXZlbnRMaXN0ZW5lcigibWVzc2FnZSIsKGZ1bmN0aW9uKGUpe2lmKHZvaWQgMCE9PWUuZGF0YVsiZGF0YXdyYXBwZXItaGVpZ2h0Il0pe3ZhciB0PWRvY3VtZW50LnF1ZXJ5U2VsZWN0b3JBbGwoImlmcmFtZSIpO2Zvcih2YXIgYSBpbiBlLmRhdGFbImRhdGF3cmFwcGVyLWhlaWdodCJdKWZvcih2YXIgcj0wO3I8dC5sZW5ndGg7cisrKXtpZih0W3JdLmNvbnRlbnRXaW5kb3c9PT1lLnNvdXJjZSl0W3JdLnN0eWxlLmhlaWdodD1lLmRhdGFbImRhdGF3cmFwcGVyLWhlaWdodCJdW2FdKyJweCJ9fX0pKX0oKTs8L3NjcmlwdD4=
Mortgages entering serious delinquency are returning to levels seen a decade ago, with lower-income homeowners experiencing the highest delinquency rates, according to data from the Federal Reserve Bank of New York.
“Overall, mortgages continue to perform well by historical standards and have risen recently only after having reached artificially low levels during the pandemic,” the FRBNY wrote in its report.
Advertisement
The FRBNY provides a snapshot of trends in household borrowing and indebtedness across mortgages, student loans, credit cards and other loans every three months.
From October to December, about 1.4% of mortgages became 90 or more days past due. Americans earning less than $58,000 had the highest delinquency rate among all income groups, with 3% of mortgages transitioning to serious delinquency.
Homeowners making more than $101,000, the highest income group, had the lowest mortgage delinquency rate at 0.7%.
The last time delinquency rates were this high was at the beginning of 2016. But mortgages entering serious delinquency had been trending downward, reaching a low in 2022 across all income groups. After 2022, delinquency has steadily increased.
The age group with the highest percentage of mortgages entering serious delinquency is adults ages 30 to 39, with 1.6% of mortgages shifting to serious delinquency at the end of 2025.
Homeowners over the age of 60 had the lowest delinquency rate at 1%. All other age groups were at 1.5%.
Compared to other loan types, mortgages had lower delinquency rates than student loans and credit cards.
At the end of 2025, 7% of credit card balances transitioned to serious delinquency. Student loans, on the other hand, had 16%.
Weather Information
`;
}
function refreshWeatherIframe(containerId) {
var iframeId = ‘weather-iframe-‘ + containerId;
var iframe = document.getElementById(iframeId);
if (iframe && iframe.src) {
var originalSrc = iframe.src;
iframe.src = originalSrc + (originalSrc.indexOf(‘?’) > -1 ? ‘&’ : ‘?’) + ‘t=’ + Date.now();
}
}
function initializeWeatherBox(container) {
var containerId = container.getAttribute(‘data-container-id’);
var isWeatherBoxV2 = containerId === ‘home-weather-v2’;
function switchWeatherTab(tabName, clickedElement) {
container.querySelectorAll(‘[data-tab-id]’).forEach(function(tab) {
tab.classList.remove(‘open’);
tab.setAttribute(‘aria-selected’, ‘false’);
});
clickedElement.classList.add(‘open’);
clickedElement.setAttribute(‘aria-selected’, ‘true’);
container.querySelectorAll(‘[data-content-id]’).forEach(function(content) {
content.style.display = ‘none’;
content.setAttribute(‘hidden’, ‘true’);
});
var targetContent = container.querySelector(‘[data-content-id=”‘ + tabName + ‘”]’);
if (targetContent) {
targetContent.style.display = ‘block’;
targetContent.removeAttribute(‘hidden’);
}
}
function loadWeatherData() {
// If weather data is already being loaded, wait for it
if (window.weatherDataPromise) {
window.weatherDataPromise.then(function(data) {
if (data && data.data) {
var weatherContainer = container.closest(‘.weather-box-container’);
if (weatherContainer) {
weatherContainer.style.display = ‘flex’;
updateCurrentWeather(data.data);
updateForecastTabs(data.data);
updateWeatherAlertsBar(data.data);
}
}
});
return;
}
var location = { zip: window.DEFAULT_ZIPCODE };
try {
var storedLocations = localStorage.getItem(‘hrst.zip.history’);
if (storedLocations) {
var locations = JSON.parse(storedLocations);
if (locations && locations.length > 0) {
location = locations[0];
}
}
} catch (e) {}
var apiUrl = (window.DEWY_HOSTNAME || ”) + ‘/api/v1/weather/full/’ + location.zip;
if (window.fetch) {
window.weatherDataPromise = fetch(apiUrl)
.then(function(response) { return response.json(); })
.then(function(data) {
if (data && data.data) {
var article = container.closest(‘.article–wrapper’);
var weatherContainer = container.closest(‘.weather-box-container’);
if (weatherContainer) {
weatherContainer.style.display = ‘flex’;
updateCurrentWeather(data.data);
updateForecastTabs(data.data);
updateWeatherAlertsBar(data.data);
}
return data;
}
})
.catch(function(error) {
console.error(‘Error loading weather:’, error);
// Reset to unknown background on error
updateWeatherBackground(‘unknown’);
});
}
}
function updateWeatherAlertsBar(weatherData) {
var weatherWatchHeader = container.querySelector(‘.weather-watch-header’);
if (!weatherWatchHeader) return;
var weatherWatchText = weatherWatchHeader.querySelector(‘.weather-watch-text’);
var weatherWatchLink = weatherWatchHeader.querySelector(‘.weather-watch-link’);
if (weatherData.alerts_count > 0) {
weatherWatchHeader.className = ‘weather-watch-header has-alerts’;
if (weatherWatchText) {
weatherWatchText.textContent = `Weather Alerts (${weatherData.alerts_count})`;
}
if (weatherWatchLink) {
if (!weatherWatchLink.getAttribute(‘data-initial-href’)) {
weatherWatchLink.setAttribute(‘data-initial-href’, weatherWatchLink.getAttribute(‘href’));
weatherWatchLink.setAttribute(‘data-initial-onclick’, weatherWatchLink.getAttribute(‘onclick’) || ”);
}
weatherWatchLink.setAttribute(‘href’, ‘/alerts’);
weatherWatchLink.setAttribute(‘onclick’, “return handleWeatherLinkClick(event, ‘click_alerts’, ‘click’, ‘mobile-weather’, ‘/alerts’);”);
}
} else {
weatherWatchHeader.className = ‘weather-watch-header’;
if (weatherWatchText) {
weatherWatchText.textContent = containerId === ‘home-weather-v2’ ? ‘Watch Latest Forecast’ : ‘Latest Forecast’;
}
if (weatherWatchLink) {
var initialHref = weatherWatchLink.getAttribute(‘data-initial-href’);
var initialOnclick = weatherWatchLink.getAttribute(‘data-initial-onclick’);
if (initialHref) {
weatherWatchLink.setAttribute(‘href’, initialHref);
}
if (initialOnclick) {
weatherWatchLink.setAttribute(‘onclick’, initialOnclick);
}
}
}
}
function updateCurrentWeather(weatherData) {
if (weatherData.current) {
var tempValue = weatherData.current.temp_f || ”;
var skyValue = weatherData.current.sky || ”;
var feelsLikeValue = weatherData.current.feels_like_f || weatherData.current.temp_f || ”;
var tempEl = container.querySelector(‘.weather-grid–current-temp-value’);
if (tempEl) {
tempEl.textContent = tempValue;
tempEl.setAttribute(‘aria-label’, tempValue + ‘ degrees Fahrenheit’);
}
var iconEl = container.querySelector(‘.weather-grid–current-icon’);
if (iconEl && weatherData.current.icon_name) {
iconEl.className = ‘weather-grid–current-icon weather-current-icon icon icon-weather-‘ + weatherData.current.icon_name;
}
var skyEl = container.querySelector(‘.weather-grid–sky’);
if (skyEl) {
skyEl.textContent = skyValue;
skyEl.setAttribute(‘aria-label’, ‘Current condition: ‘ + skyValue);
}
var feelsEl = container.querySelector(‘.weather-grid–feels’);
if (feelsEl) {
feelsEl.textContent = feelsLikeValue + ‘°F’;
feelsEl.setAttribute(‘aria-label’, feelsLikeValue + ‘ degrees Fahrenheit’);
}
var weatherContainer = container.querySelector(‘.weather-temp-container’);
if (weatherContainer) {
var summary = ‘Current temperature ‘ + tempValue + ‘ degrees Fahrenheit, ‘ +
skyValue + ‘, feels like ‘ + feelsLikeValue + ‘ degrees’;
weatherContainer.setAttribute(‘aria-label’, summary);
}
updateWeatherBackground(weatherData.current.icon_name);
}
}
function updateWeatherBackground(iconName) {
try {
var bgPath = weatherImages.backgrounds[iconName] || weatherImages.backgrounds.unknown;
container.style.backgroundImage = ‘url(‘ + bgPath + ‘)’;
} catch (e) {
console.log(‘Error updating weather background:’, e);
}
}
function updateForecastTabs(weatherData) {
var visibleItems = isWeatherBoxV2 ? 6 : 5;
if (weatherData.hourly) {
var hourlyContainer = container.querySelector(‘.weather-hourly-forecast’);
if (hourlyContainer) {
var html = ”;
var maxHours = Math.min(visibleItems, weatherData.hourly.length);
for (var i = 0; i < maxHours; i++) {
var hour = weatherData.hourly[i];
html += generateForecastItem({
timeLabel: hour.hour_display,
iconName: hour.icon_name,
primaryTemp: hour.temp_f,
secondaryInfo: hour.precip_chance + ‘%’
});
}
hourlyContainer.innerHTML = html;
}
}
if (weatherData.daily) {
var dailyContainer = container.querySelector(‘.weather-daily-forecast’);
if (dailyContainer) {
var html = ”;
var maxDays = Math.min(visibleItems, weatherData.daily.length);
for (var i = 0; i < maxDays; i++) {
var day = weatherData.daily[i];
var dayName = getShortDayName(day.day);
html += generateForecastItem({
timeLabel: dayName,
iconName: day.icon_name,
primaryTemp: day.high_f,
secondaryInfo: day.precip_chance + ‘%’
});
}
dailyContainer.innerHTML = html;
}
}
}
function getShortDayName(dayName) {
switch (dayName) {
case ‘Today’:
return ‘Today’;
case ‘Tomorrow’:
return ‘Tmrw’;
case ‘Sunday’:
return ‘Sun’;
case ‘Monday’:
return ‘Mon’;
case ‘Tuesday’:
return ‘Tue’;
case ‘Wednesday’:
return ‘Wed’;
case ‘Thursday’:
return ‘Thu’;
case ‘Friday’:
return ‘Fri’;
case ‘Saturday’:
return ‘Sat’;
default:
return dayName;
}
}
container.querySelectorAll(‘[data-tab-id]’).forEach(function(tab) {
var isActive = tab.classList.contains(‘open’);
tab.setAttribute(‘tabindex’, ‘0’); // Both tabs focusable for VoiceOver
tab.setAttribute(‘role’, ‘tab’);
tab.setAttribute(‘aria-selected’, isActive);
tab.addEventListener(‘keydown’, function(e) {
var tabs = Array.from(container.querySelectorAll(‘[data-tab-id]’));
var currentIndex = tabs.indexOf(this);
switch(e.key) {
case ‘ArrowLeft’:
e.preventDefault();
var prevIndex = currentIndex > 0 ? currentIndex – 1 : tabs.length – 1;
tabs[prevIndex].focus();
break;
case ‘ArrowRight’:
e.preventDefault();
var nextIndex = currentIndex < tabs.length – 1 ? currentIndex + 1 : 0;
tabs[nextIndex].focus();
break;
case ‘Enter’:
case ‘ ‘:
e.preventDefault();
var tabId = this.getAttribute(‘data-tab-id’);
switchWeatherTab(tabId, this);
if (tabId === ‘hourly’) {
dispatchWeatherGA4Event(‘click_hourly’, ‘click’, containerId);
} else if (tabId === ‘daily’) {
dispatchWeatherGA4Event(‘click_daily’, ‘click’, containerId);
}
break;
}
});
tab.onclick = function() {
var tabId = this.getAttribute(‘data-tab-id’);
switchWeatherTab(tabId, this);
if (tabId === ‘hourly’) {
dispatchWeatherGA4Event(‘click_hourly’, ‘click’, containerId);
} else if (tabId === ‘daily’) {
dispatchWeatherGA4Event(‘click_daily’, ‘click’, containerId);
}
return false;
};
});
loadWeatherData();
window.addEventListener(‘pageshow’, function(event) {
if (event.persisted) {
// Fix for weather radar iframe appearing gray after browser back/forward navigation
// When user navigates back, the page loads from browser cache but the iframe
// content doesn’t restore properly, showing a gray screen instead of the radar map
// This forces a fresh reload of the iframe by adding a timestamp parameter
setTimeout(function() {
refreshWeatherIframe(containerId);
}, 300);
}
});
}
document.querySelectorAll(‘.weather-sidebar’).forEach(function(weatherBox) {
initializeWeatherBox(weatherBox);
});
});
`;
}
function refreshWeatherIframe(containerId) {
var iframeId = ‘weather-iframe-‘ + containerId;
var iframe = document.getElementById(iframeId);
if (iframe && iframe.src) {
var originalSrc = iframe.src;
iframe.src = originalSrc + (originalSrc.indexOf(‘?’) > -1 ? ‘&’ : ‘?’) + ‘t=’ + Date.now();
}
}
function initializeWeatherBox(container) {
var containerId = container.getAttribute(‘data-container-id’);
var isWeatherBoxV2 = containerId === ‘home-weather-v2’;
function switchWeatherTab(tabName, clickedElement) {
container.querySelectorAll(‘[data-tab-id]’).forEach(function(tab) {
tab.classList.remove(‘open’);
tab.setAttribute(‘aria-selected’, ‘false’);
});
clickedElement.classList.add(‘open’);
clickedElement.setAttribute(‘aria-selected’, ‘true’);
container.querySelectorAll(‘[data-content-id]’).forEach(function(content) {
content.style.display = ‘none’;
content.setAttribute(‘hidden’, ‘true’);
});
var targetContent = container.querySelector(‘[data-content-id=”‘ + tabName + ‘”]’);
if (targetContent) {
targetContent.style.display = ‘block’;
targetContent.removeAttribute(‘hidden’);
}
}
function loadWeatherData() {
// If weather data is already being loaded, wait for it
if (window.weatherDataPromise) {
window.weatherDataPromise.then(function(data) {
if (data && data.data) {
var weatherContainer = container.closest(‘.weather-box-container’);
if (weatherContainer) {
weatherContainer.style.display = ‘flex’;
updateCurrentWeather(data.data);
updateForecastTabs(data.data);
updateWeatherAlertsBar(data.data);
}
}
});
return;
}
var location = { zip: window.DEFAULT_ZIPCODE };
try {
var storedLocations = localStorage.getItem(‘hrst.zip.history’);
if (storedLocations) {
var locations = JSON.parse(storedLocations);
if (locations && locations.length > 0) {
location = locations[0];
}
}
} catch (e) {}
var apiUrl = (window.DEWY_HOSTNAME || ”) + ‘/api/v1/weather/full/’ + location.zip;
if (window.fetch) {
window.weatherDataPromise = fetch(apiUrl)
.then(function(response) { return response.json(); })
.then(function(data) {
if (data && data.data) {
var article = container.closest(‘.article–wrapper’);
var weatherContainer = container.closest(‘.weather-box-container’);
if (weatherContainer) {
weatherContainer.style.display = ‘flex’;
updateCurrentWeather(data.data);
updateForecastTabs(data.data);
updateWeatherAlertsBar(data.data);
}
return data;
}
})
.catch(function(error) {
console.error(‘Error loading weather:’, error);
// Reset to unknown background on error
updateWeatherBackground(‘unknown’);
});
}
}
function updateWeatherAlertsBar(weatherData) {
var weatherWatchHeader = container.querySelector(‘.weather-watch-header’);
if (!weatherWatchHeader) return;
var weatherWatchText = weatherWatchHeader.querySelector(‘.weather-watch-text’);
var weatherWatchLink = weatherWatchHeader.querySelector(‘.weather-watch-link’);
if (weatherData.alerts_count > 0) {
weatherWatchHeader.className = ‘weather-watch-header has-alerts’;
if (weatherWatchText) {
weatherWatchText.textContent = `Weather Alerts (${weatherData.alerts_count})`;
}
if (weatherWatchLink) {
if (!weatherWatchLink.getAttribute(‘data-initial-href’)) {
weatherWatchLink.setAttribute(‘data-initial-href’, weatherWatchLink.getAttribute(‘href’));
weatherWatchLink.setAttribute(‘data-initial-onclick’, weatherWatchLink.getAttribute(‘onclick’) || ”);
}
weatherWatchLink.setAttribute(‘href’, ‘/alerts’);
weatherWatchLink.setAttribute(‘onclick’, “return handleWeatherLinkClick(event, ‘click_alerts’, ‘click’, ‘sidelist-weather’, ‘/alerts’);”);
}
} else {
weatherWatchHeader.className = ‘weather-watch-header’;
if (weatherWatchText) {
weatherWatchText.textContent = containerId === ‘home-weather-v2’ ? ‘Watch Latest Forecast’ : ‘Latest Forecast’;
}
if (weatherWatchLink) {
var initialHref = weatherWatchLink.getAttribute(‘data-initial-href’);
var initialOnclick = weatherWatchLink.getAttribute(‘data-initial-onclick’);
if (initialHref) {
weatherWatchLink.setAttribute(‘href’, initialHref);
}
if (initialOnclick) {
weatherWatchLink.setAttribute(‘onclick’, initialOnclick);
}
}
}
}
function updateCurrentWeather(weatherData) {
if (weatherData.current) {
var tempValue = weatherData.current.temp_f || ”;
var skyValue = weatherData.current.sky || ”;
var feelsLikeValue = weatherData.current.feels_like_f || weatherData.current.temp_f || ”;
var tempEl = container.querySelector(‘.weather-grid–current-temp-value’);
if (tempEl) {
tempEl.textContent = tempValue;
tempEl.setAttribute(‘aria-label’, tempValue + ‘ degrees Fahrenheit’);
}
var iconEl = container.querySelector(‘.weather-grid–current-icon’);
if (iconEl && weatherData.current.icon_name) {
iconEl.className = ‘weather-grid–current-icon weather-current-icon icon icon-weather-‘ + weatherData.current.icon_name;
}
var skyEl = container.querySelector(‘.weather-grid–sky’);
if (skyEl) {
skyEl.textContent = skyValue;
skyEl.setAttribute(‘aria-label’, ‘Current condition: ‘ + skyValue);
}
var feelsEl = container.querySelector(‘.weather-grid–feels’);
if (feelsEl) {
feelsEl.textContent = feelsLikeValue + ‘°F’;
feelsEl.setAttribute(‘aria-label’, feelsLikeValue + ‘ degrees Fahrenheit’);
}
var weatherContainer = container.querySelector(‘.weather-temp-container’);
if (weatherContainer) {
var summary = ‘Current temperature ‘ + tempValue + ‘ degrees Fahrenheit, ‘ +
skyValue + ‘, feels like ‘ + feelsLikeValue + ‘ degrees’;
weatherContainer.setAttribute(‘aria-label’, summary);
}
updateWeatherBackground(weatherData.current.icon_name);
}
}
function updateWeatherBackground(iconName) {
try {
var bgPath = weatherImages.backgrounds[iconName] || weatherImages.backgrounds.unknown;
container.style.backgroundImage = ‘url(‘ + bgPath + ‘)’;
} catch (e) {
console.log(‘Error updating weather background:’, e);
}
}
function updateForecastTabs(weatherData) {
var visibleItems = isWeatherBoxV2 ? 6 : 5;
if (weatherData.hourly) {
var hourlyContainer = container.querySelector(‘.weather-hourly-forecast’);
if (hourlyContainer) {
var html = ”;
var maxHours = Math.min(visibleItems, weatherData.hourly.length);
for (var i = 0; i < maxHours; i++) {
var hour = weatherData.hourly[i];
html += generateForecastItem({
timeLabel: hour.hour_display,
iconName: hour.icon_name,
primaryTemp: hour.temp_f,
secondaryInfo: hour.precip_chance + ‘%’
});
}
hourlyContainer.innerHTML = html;
}
}
if (weatherData.daily) {
var dailyContainer = container.querySelector(‘.weather-daily-forecast’);
if (dailyContainer) {
var html = ”;
var maxDays = Math.min(visibleItems, weatherData.daily.length);
for (var i = 0; i < maxDays; i++) {
var day = weatherData.daily[i];
var dayName = getShortDayName(day.day);
html += generateForecastItem({
timeLabel: dayName,
iconName: day.icon_name,
primaryTemp: day.high_f,
secondaryInfo: day.precip_chance + ‘%’
});
}
dailyContainer.innerHTML = html;
}
}
}
function getShortDayName(dayName) {
switch (dayName) {
case ‘Today’:
return ‘Today’;
case ‘Tomorrow’:
return ‘Tmrw’;
case ‘Sunday’:
return ‘Sun’;
case ‘Monday’:
return ‘Mon’;
case ‘Tuesday’:
return ‘Tue’;
case ‘Wednesday’:
return ‘Wed’;
case ‘Thursday’:
return ‘Thu’;
case ‘Friday’:
return ‘Fri’;
case ‘Saturday’:
return ‘Sat’;
default:
return dayName;
}
}
container.querySelectorAll(‘[data-tab-id]’).forEach(function(tab) {
var isActive = tab.classList.contains(‘open’);
tab.setAttribute(‘tabindex’, ‘0’); // Both tabs focusable for VoiceOver
tab.setAttribute(‘role’, ‘tab’);
tab.setAttribute(‘aria-selected’, isActive);
tab.addEventListener(‘keydown’, function(e) {
var tabs = Array.from(container.querySelectorAll(‘[data-tab-id]’));
var currentIndex = tabs.indexOf(this);
switch(e.key) {
case ‘ArrowLeft’:
e.preventDefault();
var prevIndex = currentIndex > 0 ? currentIndex – 1 : tabs.length – 1;
tabs[prevIndex].focus();
break;
case ‘ArrowRight’:
e.preventDefault();
var nextIndex = currentIndex < tabs.length – 1 ? currentIndex + 1 : 0;
tabs[nextIndex].focus();
break;
case ‘Enter’:
case ‘ ‘:
e.preventDefault();
var tabId = this.getAttribute(‘data-tab-id’);
switchWeatherTab(tabId, this);
if (tabId === ‘hourly’) {
dispatchWeatherGA4Event(‘click_hourly’, ‘click’, containerId);
} else if (tabId === ‘daily’) {
dispatchWeatherGA4Event(‘click_daily’, ‘click’, containerId);
}
break;
}
});
tab.onclick = function() {
var tabId = this.getAttribute(‘data-tab-id’);
switchWeatherTab(tabId, this);
if (tabId === ‘hourly’) {
dispatchWeatherGA4Event(‘click_hourly’, ‘click’, containerId);
} else if (tabId === ‘daily’) {
dispatchWeatherGA4Event(‘click_daily’, ‘click’, containerId);
}
return false;
};
});
loadWeatherData();
window.addEventListener(‘pageshow’, function(event) {
if (event.persisted) {
// Fix for weather radar iframe appearing gray after browser back/forward navigation
// When user navigates back, the page loads from browser cache but the iframe
// content doesn’t restore properly, showing a gray screen instead of the radar map
// This forces a fresh reload of the iframe by adding a timestamp parameter
setTimeout(function() {
refreshWeatherIframe(containerId);
}, 300);
}
});
}
document.querySelectorAll(‘.weather-sidebar’).forEach(function(weatherBox) {
initializeWeatherBox(weatherBox);
});
});
Loading more articles…