Connect with us

California

California threatens Tesla with 30-day suspension of sales license for deceptive self-driving claims

Published

on

California threatens Tesla with 30-day suspension of sales license for deceptive self-driving claims


SAN FRANCISCO — California regulators are threatening to suspend Tesla’s license to sell its electric cars in the state early next year unless the automaker tones down its marketing tactics for its self-driving features after a judge concluded the Elon Musk-led company has been misleading consumers about the technology’s capabilities.

The potential 30-day blackout of Tesla’s California sales is the primary punishment being recommended to the state’s Department of Motor Vehicles in a decision released late Tuesday. The ruling by Administrative Law Judge Juliet Cox determined that Tesla had for years engaged in deceptive marketing practices by using the terms “Autopilot” and “Full Self-Driving” to promote the autonomous technology available in many of its cars.

After presiding over five days of hearings held in Oakland, California in July, Cox also recommended suspending Tesla’s license to manufacture cars at its plant in Fremont, California. But California regulators aren’t going to impose that part of the judge’s proposed penalty.

Tesla will have a 90-day window to make changes that more clearly convey the limits of its self-driving technology to avoid having its California sales license suspended. After California regulators filed its action against Tesla in 2023, the Austin, Texas, company already made one significant change by putting in wording that made it clear its Full Self-Driving package still required supervision by a human driver while it’s deployed.

Advertisement

“Tesla can take simple steps to pause this decision and permanently resolve this issue — steps autonomous vehicle companies and other automakers have been able to achieve,” said Steve Gordon, the director of the California Department of Motor Vehicles.

Tesla didn’t immediately respond to a request for comment Wednesday.

The automaker has already been plagued by a global downturn in demand that began during a backlash to Musk’s high-profile role overseeing cuts in the U.S. government budget overseeing the Department of Government that President Donald Trump created in his administration. Increased competition and an older lineup of vehicles also weighed on Tesla sales, although the company did revamp its Model Y, the world’s bestselling vehicle, and unveil less-expensive versions of the Model Y and Model X.

Although Musk left Washington after a falling out with Trump, the fallout has continued to weigh on Tesla’s auto sales, which had decreased by 9% from 2024 through the first nine months of this year.

Despite the slump and the threatened sales suspension in California, Tesla’s stock price touched an all-time high $495.28 during Wednesday’s early trading before backtracking later to fall below $470. Despite that reversal, Tesla’s shares are still worth slightly more than they were before Musk’s ill-fated stint in the Trump administration — a “somewhat successful” assignment he recently said he wouldn’t take on again.

Advertisement

The performance of Tesla’s stock against the backdrop of eroding auto sales reflects the increasing emphasis that investors are placing on Musk’s efforts to develop artificial intelligence technology to implant into humanoid robots and a fleet of self-driving Teslas that will operate as robotaxis across the U.S.

Musk has been promising Tesla’s self-driving technology would fulfill his robotaxi vision for years without delivering on the promise, but the company finally began testing the concept in Austin earlier this year, albeit with a human supervisor in the car to take over if something went awry. Just a few days ago, Musk disclosed Tesla had started tests of its robotaxis without a safety monitor in the vehicle.

California regulators are far from the first critic to accuse Tesla of exaggerating the capabilities of its self-driving technology in a potentially dangerous manner. The company has steadfastly insisted that information contained in its vehicle’s owner’s manual on its website have made it clear that its self-driving technology still requires human supervision, even while releasing a 2020 video depicting one of its cars purportedly driving on its own. The video, cited as evidence against Tesla in the decision recommending a suspension of the company’s California sales license, remained on its website for nearly four years.

Tesla has been targeted in a variety of lawsuits alleging its mischaracterizations about self-driving technology have lulled humans into a false of security that have resulted in lethal accidents. The company has settled or prevailed in several cases, but earlier this year a Miami jury held Tesla partly responsible for a lethal crash in Florida that occurred while Autopilot was deployed and ordered the automaker to pay more than $240 million in damages.



Source link

Advertisement

California

Doctors, nurses arrested in Southern California health care fraud investigation

Published

on

Doctors, nurses arrested in Southern California health care fraud investigation


LOS ANGELES — The U.S. Department of Justice on Thursday announced what they called a major health care fraud takedown throughout Southern California, which included the arrest of doctors and nurses.

First Assistant U.S. Attorney Bill Essayli was joined during a press conference by several law enforcement agencies including the FBI, and Dr. Mehmet Oz, head of the Centers for Medicare and Medicaid Services.

They said they served a series of search and arrest warrants throughout the region, from Covina to Lakewood in Los Angeles County. Eight people were arrested and more than a dozen are being charged for suspected health fraud.

They also mentioned fraudulent hospice care.

Advertisement

“These defendants recruited beneficiaries who were not terminally ill, and paid them to pose as patients receiving hospice care. Medicare then paid millions of dollars – hundreds of millions of dollars – on false and fraudulent claims submitted by fraudsters,” said Essayli.

Among those arrested were a Covina couple. Prosecutors said 66-year-old psychologist Gladwin Gill and his wife, Amelou Gill, a registered nurse, operated a fraudulent hospice business out of Glendale.

“This particular hospice submitted more than $5.2 million in fraudulent claims, and Medicare actually paid out more than $4 million,” Essayli said.

Gill’s attorney told our sister station, ABC7 Eyewitness News in Los Angeles, he denies the allegations and looks forward to his day in court.

Oz announced a broader review of hospice providers in the state.

Advertisement

“We’re going to review every single hospice in California to make sure that they’re all appropriate, and we hope to do that expeditiously. We’ll do it this year,” Oz said.

During the news conference, federal authorities were questioned about a video California Gov. Gavin Newsom said in January his office was reviewing. In that video, Oz, who is Turkish American, was shown standing in front of an Armenian-owned bakery in Van Nuys while alleging widespread fraud in the area.

Essayli confirmed that none of the defendants named Thursday were connected to that video. Oz responded to outcry that his accusations, which the business owner denounced as false, were discriminatory.

“I was stating the facts as they’ve been explained to me, and we have a lot of evidence of where the fraud is, just looking at the numbers,” Oz said.

Oz did not provide any evidence against a specific business in connection to that video. He suggested that half of Los Angeles County hospice care facilities are fraudulent, pointing to survival percentages as evidence.

Advertisement

“World experts at CMS say if you’ve got 100% or near survival, certainly if you’ve got a survival over 50% for population that’s supposed to have passed in six months, you’ve got a problem,” he said.

Newsom responded to accusations that California had not done enough to address hospice fraud, saying in part, “The Trump Administration – home to the biggest fraudsters on Earth – is trying to blame California for issues with THEIR federal programs.”

His press office said the state has taken action for years, including suspending more than 280 licenses and banning new ones.

Copyright © 2026 KABC Television, LLC. All rights reserved.



Source link

Advertisement
Continue Reading

California

California law allowing people to cook, sell food from homes getting statewide push

Published

on

California law allowing people to cook, sell food from homes getting statewide push


A home-based food movement has been heating up in California, with home cooks turning their beloved family recipes into small businesses. 

When most people get laid off, they update their résumés. James Houlahan preheated his oven.

“It’s pretty brutal, and since nobody’s hiring, I just figured I need to make a job for myself,” he said.

So the San Francisco Bay Area resident went back to a family recipe and decided to take a risk, with a whisk. He started making pavlovas, a light, meringue-based Australian dessert, crisp on the outside and soft in the middle.

Advertisement

“It’s something my mom and I always joked about whenever we’d bring a pav to a party, this thing kills,” Houlahan said. “So we figured, someone’s gotta make a business out of this.”

So he did, out of his own kitchen in Alameda. 

And that’s not a loophole. A 2019 law called MEHKO, or Microenterprise Home Kitchen Operation, allows people to cook and sell food right out of their homes. Since then, more than 1,000 of these home kitchens have opened across California, operating under a growing but still patchwork system.

There are rules: food must be made from scratch and sold the same day. Not every county is on board, but there is now a push to expand it statewide.

Roya Bagheri, the executive director of The Cook Alliance, the nonprofit behind MEHKO, said the law is gaining momentum across the country as other states consider their own versions. 

Advertisement

“The cost of getting something like a food truck or a brick and mortar restaurant is so high, this creates an access to enter the food industry,” she said.

A study by the group showed more than a third of home kitchen operators have used MEHKO as a stepping stone into something bigger.

But for some, the law is still a little undercooked. Jot Condie, president and CEO of the California Restaurant Association, warned that some counties may not have the resources to take it on.

“If they don’t have the budget, there may not be a rigorous inspection procedure, and that is a huge concern for us,” Condie said.

As for Houlahan, he’s betting on his own kitchen and his mother’s name: Marianne’s Pavlovas. And his customers, like Flora Tso, are already sold.

Advertisement

“Nowadays it just gives us more choice,” she said.



Source link

Continue Reading

California

4.6 earthquake jolts Northern California awake, residents report shaking homes for miles

Published

on

4.6 earthquake jolts Northern California awake, residents report shaking homes for miles


4.6 earthquake jolts Northern California awake, residents report shaking homes for miles

Advertisement

READY… ACCORDING TO THE MONTEREY COUNTY OF EMERGENCY SERVICES THERE’S ONLY BEEN 429 EARTHQUAKES IN OUR AREA THAT ARE ABOVE A 4.0 MAGNITUDE. BUT OFFICIALS AND EXPERTS SAY IT IS ONLY A MATTER OF TIME UNTIL THE NEXT BIG ONE. NOW TO PREPARE YOU CAN SIGN UP WITH YOUR COUNTY’S EMERGENCY SERVICES ALERTS BY GOING ON THE COUNTY WEBSITE. YOU CAN ALSO DOWNLOAD THIS APP CALLED MYSHAKE. IF A QUAKE ABOVE 4.5 MAGNITUDE HITS CALIFORNIA, YOU CAN GET AN ALERT A FEW SECONDS YOU FEEL IT IN YOUR AREA. THAT DEPENDS ON HOW CLOSE YOUR ARE TO THE EPICENTER. IT WILL REMIND YOU WHAT TO DO AND ALLOWS YOU TO SHARE AND SEE WHAT DAMAGES HAVE BEEN REPORTED NEAR YOU. NOW DOWNLOADING SOME SORT OF ALERT SYSTEM IS IMPORTANT, ESPECIALLY FOR THOSE OF US LIVING NEAR THE COAST. I SPOKE WITH SANTA CRUZ COUNTY’S OFFICE OF EMERGENCY SERVICES, AND THEY HAD FOUR REMINDERS: FIRST ONE – PREP YOUR LIVING SPACE. TRY TO AVOID PLACING BOOKSHELVES AND BIG FURNITURE NEAR ENTRY WAYS THAT COULD FALL AND BLOCK DURING AN EARTHQUAKE. SECONDLY – LIKE FOR ANY NATURAL DISASTER: HAVE A PLAN. WHEN IT COMES TO AN EARTHQUAKE, UTILITIES LIKE YOUR WATER AND SEWER SYSTEM MAY NOT WORK. THIRD – MAKE SURE YOU HAVE A GO BAG PREPPED WITH YOUR FOOD, WATER, CASH… AND THE LAST ONE: PUT ALL YOUR ESSENTIAL IDENTITY AND HEALTH DOCUMENTS IN ONE PLACE SO YOU CAN JUST GRAB IT AND GO. THE BIGGEST EARTHQUAKE TO HIT OUR NECK OF THE WOODS WAS THE LOMA PRIETA QUAKE IN 1989. THAT CLOCKE

Advertisement

4.6 earthquake jolts Northern California awake, residents report shaking homes for miles

Updated: 9:36 AM CDT Apr 2, 2026

Editorial Standards

Advertisement

A magnitude 4.9 earthquake struck Northern California early Thursday, according to the U.S. Geological Survey, with many saying they felt their homes shake for a few seconds in a 100-mile stretch, including San Francisco. The quake hit at 1:41 a.m. PST east-southeast of Boulder Creek, the USGS said. It had a depth of 6.7 miles. Boulder Creek, which has about 5,000 people, is about 65 miles southeast of San Francisco.Some residents said they were first awakened by earthquake alerts on their phones, then felt their beds and windows shake. Some items were knocked off store shelves in Boulder Creek.The shaking was felt in other parts of the Central Coast, including Marina, where at least one resident said they felt slight shaking and were awakened by it.The National Tsunami Warning Center said there is no tsunami danger from the earthquake. No damage or injuries were immediately reported.

A magnitude 4.9 earthquake struck Northern California early Thursday, according to the U.S. Geological Survey, with many saying they felt their homes shake for a few seconds in a 100-mile stretch, including San Francisco.

Advertisement

The quake hit at 1:41 a.m. PST east-southeast of Boulder Creek, the USGS said. It had a depth of 6.7 miles. Boulder Creek, which has about 5,000 people, is about 65 miles southeast of San Francisco.

Some residents said they were first awakened by earthquake alerts on their phones, then felt their beds and windows shake. Some items were knocked off store shelves in Boulder Creek.

The shaking was felt in other parts of the Central Coast, including Marina, where at least one resident said they felt slight shaking and were awakened by it.

Advertisement

The National Tsunami Warning Center said there is no tsunami danger from the earthquake.

No damage or injuries were immediately reported.

Advertisement

`;
}

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’;

Advertisement

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;
}

Advertisement

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;

Advertisement

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’, “https://www.kcci.com/alerts”);
weatherWatchLink.setAttribute(‘onclick’, “return handleWeatherLinkClick(event, ‘click_alerts’, ‘click’, ‘mobile-weather’, “https://www.kcci.com/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;
}

Advertisement

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);
}
}

Advertisement

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 0 ? currentIndex – 1 : tabs.length – 1;
tabs[prevIndex].focus();
break;
case ‘ArrowRight’:
e.preventDefault();
var nextIndex = currentIndex

`;
}

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();
}
}

Advertisement

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’);
}
}

Advertisement

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’);
});
}
}

Advertisement

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’, “https://www.kcci.com/alerts”);
weatherWatchLink.setAttribute(‘onclick’, “return handleWeatherLinkClick(event, ‘click_alerts’, ‘click’, ‘sidelist-weather’, “https://www.kcci.com/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’);
}

Advertisement

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);
}
}

Advertisement

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 0 ? currentIndex – 1 : tabs.length – 1;
tabs[prevIndex].focus();
break;
case ‘ArrowRight’:
e.preventDefault();
var nextIndex = currentIndex

Loading more articles…

Advertisement



Source link

Continue Reading

Trending